base.StringBuffer.replace

Replace one string with another.

Syntax

replace(
   old STRING,
   new STRING,
   occ INTEGER )
  1. old is the string to be replaced.
  2. new is the new string replacing the old string.
  3. occ is the number of replacements to do.

Usage

The replace() method replaces a string within the current string buffer with a different string. Specify the original string, replacement string, and the number of occurrences to replace. Use 0 to replace all occurrences.

CALL buf.append("aaxxbbxxcc")
CALL buf.replace("xx", "zz", 1)
DISPLAY buf.toString() -- Shows aazzbbxxcc