abstract compensator string manipulation

This commit is contained in:
brmnjsh
2023-09-15 19:37:47 +00:00
parent 64a1011604
commit ae4ed690f7
2 changed files with 5 additions and 3 deletions

View File

@ -12,3 +12,6 @@ def is_float(element: str) -> bool:
return True
except ValueError:
return False
def camel_to_snake(camel_string: str) -> str:
return re.sub(r'(?<!^)(?=[A-Z])', '_', camel_string).lower()