Skip to content

Latest commit

 

History

History

capitalize-words

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Capitalize all Words

DropCaps means that the first letter of the starting word of the paragraph should be in caps and the remaining lowercase, just like you see in the newspaper.

But for a change, let"s do that for each and every word of the given String. Your task is to capitalize every word that has length greater than 2, leaving smaller words as they are.

"apple of banana"  => "Apple of Banana"
"one   space"      => "One   Space"
"   space WALK   " => "   Space Walk   "