Turn string into snake case.

string:to_snake_case(STRING $string) : STRING

# what is snake_case?
# https://en.wikipedia.org/wiki/Snake_case

string:to_snake_case('User Name')
#=> "user_name"

string:to_snake_case('userName')
#=> "user_name"

string:to_snake_case('user name')
#=> "user_name"

string:to_snake_case('user-name')
#=> "user_name"

string:to_snake_case('user__name')
#=> "user_name"

string:to_snake_case('it is veryNice')
#=> "it_is_very_nice"

string:to_snake_case('This IS verY usefull')
#=> "this_i_s_ver_y_usefull"

string:to_snake_case('good@#$Test one')
#=> "good@#\$test_one"

Copyright ©2013-2022 SunSed®. All rights reserved.