← 返回 google 的题目列表Convert Snake Case to camelCase
类型:online_judge
Given a valid snake_case identifier, convert it to camelCase.
The input is guaranteed to satisfy:
It contains only lowercase English letters and underscores _.
It does not start or end with _.
It does not contain consecutive underscores.
Therefore, every underscore separates two non-empty words.
Conversion rules:
Keep the first word unchanged.
For every subsequent word, capitalize its first letter and remove the preceding underscore.
Keep all other letters lowercase.
Input Format
One line containing a valid snake_case identifier.
Output Format
Print the corresponding camelCase identifier.
Example
Input:
foo_bar_baz
Output:
fooBarBaz
Constraints
The identifier length is between 1 and 10^5.
Example
Input
foo_bar
Output
fooBar