Interconversion
camelCase and snake_case are able to be converted each other. Natural interconverting is to carry out the following steps.
camelCase ⇒ snake_case
# | Procedure | Actual Example |
---|---|---|
0 | original camelCase | getRawKeys |
1 | tokenize | get + Raw + Keys |
2 | all words to lower case | get + raw + keys |
3 | concatenate with between delimiter | get_raw_keys |
snake_case ⇒ camelCase
# | Procedure | Actual Example |
---|---|---|
0 | original snake_case | get_raw_keys |
1 | tokenize by delimiter | get + raw + keys |
2 | capitalize each word except first | get + Raw + Keys |
3 | concatenate | getRawKeys |
Many libraries to convert between camelCase and snake_case, have been created in a variety of programming languages by programmers around the world.