syntactic.capitalize¶
- syntactic.capitalize(obj: str | list[str], strict: bool = False) list[str]¶
Capitalize the first letter of each space-delimited word.
- Parameters:
- Returns:
Capitalized string(s).
- Return type:
Examples
>>> capitalize(["fooBar", "HELLO"]) ['FooBar', 'HELLO'] >>> capitalize(["fooBar", "HELLO"], strict=True) ['Foobar', 'Hello']