#C13557. Convert Snake Case to Camel Case
Convert Snake Case to Camel Case
Convert Snake Case to Camel Case
The goal of this problem is to convert a given string from snake_case to camelCase. In snake_case, words are separated by underscores while in camelCase, the first word is in lowercase and every following word starts with an uppercase letter followed by lowercase letters.
For example, the snake_case string this_is_an_example_phrase
should be converted to thisIsAnExamplePhrase
. Special cases include handling multiple consecutive underscores, as well as leading or trailing underscores. If the string begins with an underscore, the first non-empty word should have its first letter capitalized.
Make sure your solution reads input from stdin and writes the result to stdout.
inputFormat
The input consists of a single line containing a non-empty string in snake_case format.
outputFormat
Output the corresponding camelCase version of the input string in a single line.
## samplethis_is_an_example_phrase
thisIsAnExamplePhrase
</p>