Text and string functions
- Last UpdatedSep 29, 2026
- 5 minute read
Case and whitespace
|
Function / Aliases |
Return |
Description |
Example |
|---|---|---|---|
|
TOLOWERCASE / TOLOWER |
String |
Convert to lowercase |
{{ 'ABC'.toLower }} |
|
TOUPPERCASE / TOUPPER |
String |
Convert to uppercase |
{{ 'abc'.toUpper }} |
|
TOTITLECASE / TOTITLE |
String |
Convert to title case |
{{ 'the strangeness'.toTitleCase }} |
|
TRIM |
String |
Trim leading/trailing whitespace |
{{ ' text '.trim }} |
|
SANITISE / SIMPLIFYWHITESPACE |
String |
Removes surrounding whitespace and converts any instances of multiple whitespace to a single space character |
{{ ' hello world '.sanitise }} |
Substrings and extraction
|
Function / Aliases |
Return |
Description |
Example |
|---|---|---|---|
|
LEFT |
String |
Left N characters |
{{ 'IPE'.left(2) }} |
|
LENGTH / LEN |
Int |
Length of string |
{{ 'text'.length }} |
|
SUBSTRING |
String |
Extract substring |
{{ 'hello'.substring(3,10) }} |
|
LEADINGDIGITS |
String |
Leading numeric digits |
{{ '110FT100'.leadingDigits }} |
|
TRAILINGDIGITS |
String |
Trailing numeric digits |
{{ '110FT100'.trailingDigits }} |
|
TRAILINGLETTERS |
String |
Returns trailing letters from some text |
'ABC110FT100-TX'.trailingLetters => 'TX' |
|
LEADINGLETTERS |
String |
Leading letters |
{{ 'ABC110'.leadingLetters }} |
|
EXTRACTDIGITS |
String |
Extract all digits |
{{ '1ce 8 t1me'.extractDigits }} |
Padding and concatenation
|
Function / Aliases |
Return |
Description |
Example |
|---|---|---|---|
|
PADLEFT / LPAD |
String |
Left-pad to length |
{{ 'Hi'.padLeft(' |