Convert Snake Case to Camel Case
Problem statement
Convert a lowercase snake-case string to lower camel case. Keep the first nonempty component lowercase, capitalize the first letter of each later nonempty component, and remove every underscore. Consecutive, leading, and trailing underscores are allowed.
Function
snakeToCamelCase(snake: String) → StringExamples
Example 1
snake = "hello_world"return = "helloWorld"The later component begins with an uppercase letter.
Example 2
snake = "one_two_three"return = "oneTwoThree"Every later component is capitalized.
Constraints
0 <= snake.length <= 100000snakecontains lowercase English letters and underscores.