replace

Replaces every occurrence of a piece of text with another. The search is plain text, not a pattern, and case-sensitive; an empty search leaves the text as it is.

Runs on: either side: the compiler places the statement that calls it where the values it uses live.

Format:

replace(text, search, replacement)

Parameters:

Parameter Type Description
text string the text
search string the text to find
replacement string the text put in its place (may be empty)

Returned Value:

Type Description
string the text with the replacements made

Examples

slug = replace(lower(trim(title)), " ", "-")