On This Page

String Functions

Functions for text manipulation, searching, and formatting. You can try them in the Expression Editor with a free trial.

len

(text)

Returns the length of a string in characters.

Parameters
text string String to measure
Returns number
Examples
len("Hello") → 5
len("") → 0

left

(text, count)

Returns the first N characters of a string.

Parameters
text string Source string
count number Number of characters to extract
Returns string
Examples
left("ProcessMind", 7) → Process
See Also
(text, count)

Returns the last N characters of a string.

Parameters
text string Source string
count number Number of characters to extract
Returns string
Examples
right("ProcessMind", 4) → Mind
See Also

mid

(text, start, count)

Returns a substring from the middle of a string, starting at a 1-based position and extracting the specified number of characters.

Parameters
text string Source string
start number Starting position (1-based)
count number Number of characters to extract
Returns string
Examples
mid("ProcessMind", 8, 4) → Mind
mid("Hello World", 1, 5) → Hello
See Also

lower

(text)

Converts a string to lowercase.

Parameters
text string String to convert
Returns string
Examples
lower("HELLO") → hello
See Also

upper

(text)

Converts a string to uppercase.

Parameters
text string String to convert
Returns string
Examples
upper("hello") → HELLO
See Also

proper

(text)

Converts a string to Proper Case, capitalizing the first letter of each word.

Parameters
text string String to convert
Returns string
Examples
proper("hello world") → Hello World
proper("HELLO WORLD") → Hello World
See Also

trim

(text)

Removes whitespace from both ends of a string.

Parameters
text string String to trim
Returns string
Examples
trim(" hello ") → hello
See Also

trimStart

(text)

Removes whitespace from the beginning of a string.

Parameters
text string String to trim
Returns string
Examples
trimStart(" hello") → hello
See Also

trimEnd

(text)

Removes whitespace from the end of a string.

Parameters
text string String to trim
Returns string
Examples
trimEnd("hello ") → hello
See Also

replace

(text, search, replacement)

Replaces every occurrence of a search string with a replacement string.

Parameters
text string Source string
search string String to find
replacement string Replacement string
Returns string
Examples
replace("Hello World", "World", "ProcessMind") → Hello ProcessMind
replace("a-b-c", "-", "_") → a_b_c

concat

(text1, text2, ...?)

Joins two or more strings.

Parameters
text1 string First string
text2 string Second string
... (optional) string Additional strings, up to 6 total
Returns string
Examples
concat("Hello", " ", "World") → Hello World
Notes

You can also use the + operator for string concatenation.

contains

(text, search)

Checks whether a string contains another string.

Parameters
text string String to search
search string String to find
Returns boolean
Examples
contains("ProcessMind", "Mind") → true
contains("Hello", "xyz") → false
See Also

startsWith

(text, prefix)

Checks whether a string starts with the specified prefix.

Parameters
text string String to check
prefix string Prefix to find
Returns boolean
Examples
startsWith("ProcessMind", "Process") → true
See Also

endsWith

(text, suffix)

Checks whether a string ends with the specified suffix.

Parameters
text string String to check
suffix string Suffix to find
Returns boolean
Examples
endsWith("ProcessMind", "Mind") → true
See Also

indexOf

(text, search)

Returns the 1-based position of the first occurrence of a substring, or 0 if it isn't found.

Parameters
text string String to search
search string String to find
Returns number
Examples
indexOf("ProcessMind", "Mind") → 8
indexOf("Hello", "xyz") → 0
See Also

find

(search, text)

Alias for indexOf. Returns the 1-based position of the first occurrence of a substring.

Parameters
search string String to find
text string String to search
Returns number
Examples
find("Mind", "ProcessMind") → 8
Notes

Note the parameter order is reversed compared to indexOf.

See Also

padLeft

(text, length, char?)

Pads a string on the left to the specified length.

Parameters
text string String to pad
length number Target length
char (optional) string Padding character (default: " " (space))
Returns string
Examples
padLeft("42", 5, "0") → 00042
padLeft("Hi", 5) → Hi
See Also

padRight

(text, length, char?)

Pads a string on the right to the specified length.

Parameters
text string String to pad
length number Target length
char (optional) string Padding character (default: " " (space))
Returns string
Examples
padRight("Hi", 5, ".") → Hi...
See Also

Design better processes. Build a connected architecture. Stay in control.

Get instant access with no credit card and no waiting. Turn the way your organization works into clear, connected process designs.

Build your process architecture, define ownership and controls, and align roles and responsibilities across every level.

Start your free trial and create one reliable foundation for governing, managing, and continuously improving your processes.