Module ro_py.utilities.caseconvert
Expand source code
import re
pattern = re.compile(r'(?<!^)(?=[A-Z])')
def to_snake_case(string):
return pattern.sub('_', string).lower()
Functions
def to_snake_case(string)
-
Expand source code
def to_snake_case(string): return pattern.sub('_', string).lower()