cased
Written as cased(argnum flags):options in a transform expression.
| Minimum arguments | 1 |
| Maximum arguments | 1 |
| Default arguments | 1 |
| Argument modes | SINGLE_PRIMITIVE |
Documentation
Section titled “Documentation”Convert text casing according to specified style.
This transform modifies the case of input text according to the specified option. Multiple casing styles are supported through the options string.
Supported Options:
- ‘lower’: Convert all characters to lowercase (default)
- ‘upper’: Convert all characters to uppercase
- ‘title’: Convert first character of each word to uppercase
- ‘swap’: Invert case of each character
Notes:
- Defaults to lowercase if no option specified
- Empty option string is treated as ‘lower’
- Raises ValueError for invalid option values
- Preserves non-alphabetic characters
- Locale-aware for case conversion
| Flag | Letter |
|---|---|
| noncaptive_input | I |
Examples
Section titled “Examples”Convert to lowercase (default)
Section titled “Convert to lowercase (default)”Input args: ["Hello World"]Transforms: "cased:"Output: "hello world"Convert to lowercase (explicit)
Section titled “Convert to lowercase (explicit)”Input args: ["Hello World"]Transforms: "cased:lower"Output: "hello world"Convert to uppercase
Section titled “Convert to uppercase”Input args: ["Hello World"]Transforms: "cased:upper"Output: "HELLO WORLD"Convert to title case
Section titled “Convert to title case”Input args: ["hello world"]Transforms: "cased:title"Output: "Hello World"Swap case
Section titled “Swap case”Input args: ["Hello World"]Transforms: "cased:swap"Output: "hELLO wORLD"