ReplaceText

Purpose With  ReplaceText you can replace strings in a text variable.
Examples ReplaceText "t1" from="<account>" to="1245678"

All occurrences of the string "<account>" in the text "t1" are replaced with "1245678".

Format ReplaceText "textvar" from="string1" to="string2"

In the text variable “textvar”, all occurrences of the  from= string are replaced with the to= string.  You can then use  if Q[ok] in order to query whether at least one string replacement has been carried out.

Instead of from= you can also use fromHexCode= ; analogously toHexCode= instead of  to= . Using this notation you can specify  hexadecimal strings. Examples:

// set newline code
ReplaceText
"t1" from="<newline>"
 toHexCode="0d0a"

// delete utf8-header
ReplaceText
"t1" fromHexCode="efbbbf"
 to=""

ReplaceText