$return = replace(string,oldString,newString)
Where:
$return | the string with the specified characters replaced.. |
string | variable containing text to be replaced.. |
oldString | the string to replaced. Enclose oldString in double quotation marks ("") if it contains embedded spaces or commas. |
newString | the replacement string. Enclose newString in double quotation marks ("") if it contains embedded spaces or commas. |
string, oldString and newString may be variables.
The replace command replaces all occurrences of oldString in string with newString.
Example
$return = replace($variable,dog,cat)
Sample Script
' This script replaces fox with dog
$string = "The quick brown fox."
$old = "fox"
$new = "dog"
$return = replace($string,$old,$new)
MsgBox($return)
exit
TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.