Text Functions
Text functions help you normalize, slice, and inspect strings.
| Function | Description | Examples |
|---|---|---|
| UPPER | Convert to uppercase | UPPER("Hello World") → "HELLO WORLD" |
| LOWER | Convert to lowercase | LOWER("Hello World") → "hello world" |
| TRIM | Remove leading and trailing whitespace | TRIM(" hello ") → "hello" |
| LEFT | Left substring | LEFT("Hello World", 5) → "Hello" LEFT("Test", 10) → "Test" |
| RIGHT | Right substring | RIGHT("Hello World", 5) → "World" RIGHT("Test", 10) → "Test" |
| MID | Middle substring | MID("Test", 1, 4) → "Test" MID("Hello World", 7, 5) → "World" |
| CONTAINS | Check if string contains text | CONTAINS("Hello World", "World") → true CONTAINS("Hello World", "Universe") → false |
| STARTS_WITH | Check if string starts with text | STARTS_WITH("Hello World", "Hello") → true STARTS_WITH("Hello World", "Universe") → false |
| ENDS_WITH | Check if string ends with text | ENDS_WITH("Hello World", "World") → true ENDS_WITH("Hello World", "Universe") → false |
| SUBSTITUTE | Replace text in string. Replace all instances of the old text with the new text. Optionally, limit the number of replacements to the specified number. | SUBSTITUTE("code c", "c", "m") → "mode m" SUBSTITUTE("A B A B", "A", "-", 1) → "- B A B" |
| REPLACE | Replace text in string. Starting at the specified position, replace the specified number of characters with the new text. | REPLACE("Hello World", 1, 5, "Hi") → "Hi World" |