syntactic.upper_camel_case¶
- syntactic.upper_camel_case(obj: str | list[str], strict: bool = True, smart: bool = True, prefix: bool = True) list[str]¶
Convert strings to UpperCamelCase (PascalCase).
- Parameters:
strict (bool) – Enforce strict name sanitization. When
True, this does not allow the return of any capitalized acronyms; e.g. “RNA” becomes “Rna”.smart (bool) – Handle complicated special cases, such as mixed case acronyms, plus/minus, and percentages.
prefix (bool) – Prepend an “X” character if the string begins with a syntactically invalid character, such as a number.
- Returns:
UpperCamelCase string(s).
- Return type:
Examples
>>> upper_camel_case(["human_genome_version", "sample_id"]) ['HumanGenomeVersion', 'SampleId']