Capitalize Words
EasyString
Description
Given a string s of lowercase words separated by single spaces, return the string with the first letter of every word capitalized.
Examples
Input:
s = "the quick brown fox"Output:
"The Quick Brown Fox"Explanation:
Uppercasing the first letter of every word produces "The Quick Brown Fox".
Input:
s = "hello world"Output:
"Hello World"Explanation:
Uppercasing the first letter of every word produces "Hello World".
Input:
s = "code arena"Output:
"Code Arena"Explanation:
Uppercasing the first letter of every word produces "Code Arena".
Constraints
- •
1 ≤ s.length ≤ 10⁴ - •
Words are separated by single spaces.