replace (x, s, t)

The function 'replace' (x, s, t) returns the content of the Text-parameter x, where all occurrences of the Text-parameter s are replaced by the content of the Text-parameter t. If s is empty, nothing is replaced and the result is equal to the original parameter x. The search-and-replace is done from left to right, and neither overlapping sub-strings nor any replaced text are considered for replacement.

This function returns a value of type Text.

Example
replace ("The Quick Brown Fox Jumps Over The Lazy Dog", "The", "a")

Result: "a Quick Brown Fox Jumps Over a Lazy Dog"

eplace ("The Quick Brown Fox Jumps Over The Lazy Dog", "the", "that")

Result: "The Quick Brown Fox Jumps Over The Lazy Dog"

replace ("The Quick Brown Fox Jumps OOOver The Lazy Dog", "OO", "oOOo")

Result: "The Quick Brown Fox Jumps oOOoOver The Lazy Dog"