When to use these helpers
Use these helpers to clean, format, search, split, and safely present text. Keep identifiers stable; do not use a display transformation as a substitute for a stored business value.Calling style
Call a helper astrim($.request_reference). Not every helper is available everywhere: validation, form, and document-template helpers have distinct context contracts. Editor suggestions are not proof that a helper is supported at runtime.
Complete function reference
camelCase
Converts a string to camel case
Signature: camelCase(str)
Example:
value | camelCase(...).
capitalize
Capitalizes the first letter of a string
Signature: capitalize(str)
Example:
value | capitalize(...).
charCount
Counts the number of characters in a string
Signature: charCount(str)
Example:
value | charCount(...).
count
Counts occurrences of a substring in a string
Signature: count(str, search)
Example:
value | count(...).
countRegex
Counts occurrences of a regex in a string
Signature: countRegex(str, regex, flags?)
Example:
value | countRegex(...).
endsWith
Checks if a string ends with a specified substring
Signature: endsWith(str, substring)
Example:
value | endsWith(...).
escapeHtml
Escapes HTML special characters in a string
Signature: escapeHtml(str)
Example:
value | escapeHtml(...).
initials
Extracts the initials from a string
Signature: initials(str)
Example:
value | initials(...).
kebabCase
Converts a string to kebab case
Signature: kebabCase(str)
Example:
value | kebabCase(...).
lines
Splits a string into an array of lines
Signature: lines(str)
Example:
value | lines(...).
lower
Converts a string to lowercase
Signature: lower(str)
Example:
value | lower(...).
mask
Masks a string by replacing characters with a specified character
Signature: mask(str, maskChar, start, end)
Example:
value | mask(...).
matchRegex
Returns all matches of a regex against the string
Signature: matchRegex(str, regex, flags?)
Example:
value | matchRegex(...).
normalizeSpace
Removes duplicate consecutive whitespace characters.
Signature: normalizeSpace(str)
Example:
value | normalizeSpace(...).
pad
Pads a string to a specified length with another string
Signature: pad(str, targetLength, padString?)
Example:
value | pad(...).
padEnd
Pads a string from the end with another string
Signature: padEnd(str, targetLength, padString?)
Example:
value | padEnd(...).
padStart
Pads a string from the start with another string
Signature: padStart(str, targetLength, padString?)
Example:
value | padStart(...).
pascalCase
Converts a string to Pascal case
Signature: pascalCase(str)
Example:
value | pascalCase(...).
repeat
Repeats a string a specified number of times
Signature: repeat(str, count)
Example:
value | repeat(...).
replace
Replaces the first occurrence of a substring with another string
Signature: replace(str, oldStr, newStr)
Example:
value | replace(...).
replaceAll
Replaces all occurrences of a substring with another string
Signature: replaceAll(str, oldStr, newStr)
Example:
value | replaceAll(...).
replaceLast
Replaces the last occurrence of a substring with another string
Signature: replaceLast(str, search, replace)
Example:
value | replaceLast(...).
replaceRegex
Replaces substrings matched by a regex pattern with a replacement string
Signature: replaceRegex(str, regex, replace, flags?)
Example:
value | replaceRegex(...).
slug
Converts a string to a URL-friendly slug
Signature: slug(str)
Example:
value | slug(...).
snakeCase
Converts a string to snake case
Signature: snakeCase(str)
Example:
value | snakeCase(...).
split
Splits a string into an array of substrings
Signature: split(str, separator)
Example:
value | split(...).
startsWith
Checks if a string starts with a specified substring
Signature: startsWith(str, substring)
Example:
value | startsWith(...).
substr
Extracts a substring from a string
Signature: substr(str, start, end?)
Example:
value | substr(...).
titleCase
Converts a string to title case
Signature: titleCase(str)
Example:
value | titleCase(...).
trim
Removes whitespace from both ends of a string
Signature: trim(str)
Example:
value | trim(...).
trimEnd
Removes whitespace from the end of a string
Signature: trimEnd(str)
Example:
value | trimEnd(...).
trimStart
Removes whitespace from the start of a string
Signature: trimStart(str)
Example:
value | trimStart(...).
truncate
Truncates a string to a specified length
Signature: truncate(str, length)
Example:
value | truncate(...).
unescapeHtml
Unescapes HTML special characters in a string
Signature: unescapeHtml(str)
Example:
value | unescapeHtml(...).
upper
Converts a string to uppercase
Signature: upper(str)
Example:
value | upper(...).
wordCount
Counts the number of words in a string
Signature: wordCount(str)
Example:
value | wordCount(...).
Before you publish
- Start with a known value and confirm the expected result.
- Handle null, empty text, and empty lists deliberately.
- Do not place secrets, access tokens, or sensitive personal data in an expression.
- Read expression contexts and availability before copying an expression between features.


