%stringReplace()

Aliases%stringReplace()
Parametersstring @needle1, string @needle2, string @haystack

    This function will replace all occurrences of the string defined by
needle1 by the string defined by needle2 in the haystack.

Example:

@oldText = "One one Two two Three three Four four"
@newText = %stringReplace( Two, 2, @oldText )
echo Old Text: [@oldText]
echo New Text: [@newText]

Output:

Old Text: [One one Two two Three three Four four]
New Text: [One one 2 two Three three Four four]