Problem 44499. Capitilize the first letter of every word in a string
For a given input string, capitalize every letter at the beginning of a word, and transform the rest of the letters to lower-case.
Non-letter characters should remain the same.
You can assume there is only one space between every two words.
Examples:
input: 'this is BETTER than C++' output: 'This Is Better Than C++'
input: 'hEy, tHis iS vErY wroNg!' output: 'Hey, This Is Very Wrong!'
Solution Stats
Problem Comments
-
1 Comment
goc3
on 13 Jul 2018
Additional test cases have been added.
Solution Comments
Show commentsProblem Recent Solvers115
Suggested Problems
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2007 Solvers
-
Duplicate each element of a vector.
592 Solvers
-
07 - Common functions and indexing 1
417 Solvers
-
07 - Common functions and indexing 6
430 Solvers
-
Replace every 3rd element in a vector with 4
234 Solvers
More from this Author25
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!