Problem Statement | |||||||||||||
| A common word-processing task is capitalizing the first letter of each word in a title. Write a class TitleString with a method toFirstUpperCase that takes a String title containing lowercase words separated by one or more space characters and returns a String that is identical to title except with the first character of each word capitalized. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Notes | |||||||||||||
| - | title may have leading or trailing spaces. | ||||||||||||
Constraints | |||||||||||||
| - | title will contain between 0 and 50 characters, inclusive. | ||||||||||||
| - | Each character of title will either be a space or a lowercase letter ('a' to 'z'). | ||||||||||||
Examples | |||||||||||||
| 0) | |||||||||||||
| |||||||||||||
| 1) | |||||||||||||
| |||||||||||||
| 2) | |||||||||||||
| |||||||||||||
| 3) | |||||||||||||
| |||||||||||||
| 4) | |||||||||||||
| |||||||||||||
| 5) | |||||||||||||
| |||||||||||||
| 6) | |||||||||||||
| |||||||||||||