Snake Case to Camel Case
name is lowercase words joined by single underscores, like my_var_name. Return it in camel case: keep the first word as it is and capitalize the first letter of every later word, with no underscores. A name with no underscore is returned unchanged.
Example 1
name "my_var_name"
returns "myVarName"
my + Var + Name.
Constraints
1 <= len(name) <= 50- Lowercase letters with single underscores between words, none at the start or end
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More Strings problems
- Stretch Each CharacterBeginner
- Student Attendance RecordBeginner
- Sum of Digits in TextBeginner
- Truncate SentenceBeginner
- Two String Lists Spell the Same WordBeginner
- Vowel and Consonant TallyBeginner
- Abbreviate Long WordsEasy
- Buddy StringsEasy