string.multipleReplaceAll

Syntax string.multipleReplaceAll (s, adrTable, flCaseSensitive, startCharacters, endCharacters)

Params s is a string containing text to replace.

adrTable is the address of a table containing items to replace in the string.

flCaseSensitive is a boolean. If true, then the replacements are case sensitive.

startCharacters is an optional string specifying extra characters to look for before each replacement.

endCharacters is an optional string specifying extra characters to look for after each replacement.

Action Performs multiple string replacements in a string.

Returns A string.

Examples local (t);new (tableType, @t);t.sample = "test";string.multipleReplaceAll ("This is a sample.", @t, false)

   » "This is a test."

local (t);new (tableType, @t);t.a = "x";t.b = "y";t.c= "z";string.multipleReplaceAll ("Abc", @t, true)

   » "Ayz"

local (t);new (tableType, @t);t.a = "x";t.b = "y";t.c= "z";string.multipleReplaceAll ("[[a]]bc", @t, false, "[[", "]]")

   » "xbc"

Notes This verb is intended to be used when you would otherwise call string.replaceAll many times.

This verb is new in Frontier 7.1.

See Also string.replaceAll

string.replace

Discuss