X661: Title Case

Write a function toTitleCase(s) that returns the s converted to Title Case. Title case has each word in the s with its first letter in upper case. All other letters must be in lowercase.

Examples:

toTitleCase("WHERE WE GO FROM HERE") -> "Where We Go From Here"
toTitleCase("i have a dream") -> "I Have A Dream"

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.