feat: deals filters
This commit is contained in:
8
utils/strings.py
Normal file
8
utils/strings.py
Normal file
@ -0,0 +1,8 @@
|
||||
import re
|
||||
from typing import Optional
|
||||
|
||||
|
||||
def camel_to_snake(string: Optional[str]) -> str:
|
||||
if not string:
|
||||
return string
|
||||
return re.sub(r"(?<!^)(?=[A-Z])", "_", string).lower()
|
||||
Reference in New Issue
Block a user