LOTUSSCRIPT LANGUAGE
Replaces specific words or phrases in a string with new words or phrases that you specify.
Note This function is new with Domino Release 6.
Syntax
Replace(sourceArray, findArray, replacementArray [, start [, count [, compMethod]]])
Elements
sourceArray
Replace returns an Array of type String that contains sourceArray, where any values in replaceArray have been replaced by the corresponding values in replacementArray.
Usage
Replace searches the String in sourceArray for the String in replaceArray. If a match is found, the substring is replaced with a corresponding substring from replacementArray. Each String in replaceArray is scanned against each String in sourceArray as modified by prior substitutions. Replace is case sensitive.
If no matches are found, then a copy of sourceArray is returned.
If more strings are specified in replaceArray than in replacementArray, the extra strings in replaceArray are replaced with the last string in replacementArray. Extra strings in replacementArray are ignored.
For example:
replaceArray = ["first"]["second"]["1"]["third"]["2"]["3"]
replacementArray = ["1"]["2"]["a"]["3"]["b"]["c"]
First, Replace substitutes "1" for "first" (the first String in replacementArray replaces the first string in replaceArray):
Language cross-reference
@Replace function in formula language
EditFind @command in formula language
Example See Also