#78 Convert PascalCase string into snake_case
Complete the function/method so that it takes CamelCase string and returns the string in snake_case notation. Lowercase characters can be numbers. If method gets number, it should return string.
Examples:
// returns test_controller
toUnderscore('TestController');
// returns movies_and_books
toUnderscore('MoviesAndBooks');
// returns app7_test
toUnderscore('App7Test');
// returns "1"
toUnderscore(1);
'매일매일개발 > Codewars' 카테고리의 다른 글
codewars #80 Calculating Batting Average (6kyu) (0) | 2018.07.17 |
---|---|
codewars #79 Human readable duration format (4kyu) (0) | 2018.07.13 |
codewars #77 Tortoise racing (6kyu) (0) | 2018.07.11 |
codewars #76 Ones and Zeros (7kyu) (0) | 2018.07.10 |
codewars #75 Numericals of a String (6kyu) (0) | 2018.07.09 |