Usage
Function ZAP.Common.ReplaceSubString (
String Str,
String OldValue,
String NewValue
)
ZAP Utility
...ReplaceSubString
oldString
old
new
output
String Str
String OldValue
String NewValue
Output Parameter
Parameters
Str
Type: String
Current String
OldValue
Type: String
The string to be replaced
NewValue
Type: String
The string to replace all occurrences of oldValue
Returns
A string that is equivalent to the current string except that all instances of oldValue are replaced with newValue. If oldValue is not found in the current instance, the method returns the current instance unchanged
Example
VBScript
newString = Zap.Common.ReplaceSubString("oldString", "old", "new")
JavaScript
var newString = Zap.Common.ReplaceSubString("oldString", "old", "new");
ZAP Utility
...ReplaceSubString
oldString
old
new
newString

Comment
Replace "old" substrings to "new" and save it to variable parameter