Exemple #1
0
def camel_case_to_pascal_case(string: str,
                              literals: List[str] = None,
                              format_literals: List[str] = None):
    words = parse_camel_case(string, literals)
    return CaseDelimitedFormatter(CharacterType.UPPERCASE,
                                  format_literals).format(words)
Exemple #2
0
def snake_case_to_pascal_case(string: str, format_literals: List[str]):
    words = parse_snake_case(string)
    return CaseDelimitedFormatter(CharacterType.UPPERCASE,
                                  format_literals).format(words)
Exemple #3
0
 def __init__(self):
     super().__init__(CaseDelimitedFormatter(CharacterType.UPPERCASE))
Exemple #4
0
def path_to_camel_case(string: str, format_literals: List[str]):
    words = parse_path(string)
    return CaseDelimitedFormatter(CharacterType.LOWERCASE,
                                  format_literals).format(words)
Exemple #5
0
 def perform(self, namespace: Namespace):
     if namespace.format_literals:
         self._formatter = CaseDelimitedFormatter(CharacterType.LOWERCASE, namespace.format_literals)
     super().perform(namespace)