Added all schematics to command generate

This commit is contained in:
2021-03-12 15:32:37 +01:00
parent 2ad97d5021
commit c9b612d552
7 changed files with 239 additions and 30 deletions

View File

@@ -9,3 +9,11 @@ class String:
pattern2 = re.compile(r'([a-z0-9])([A-Z])')
file_name = re.sub(pattern1, r'\1_\2', name)
return re.sub(pattern2, r'\1_\2', file_name).lower()
@staticmethod
def first_to_upper(string: str) -> str:
return f'{string[0].upper()}{string[1:]}'
@staticmethod
def first_to_lower(string: str) -> str:
return f'{string[0].lower()}{string[1:]}'