The StringBuffer class / base.StringBuffer methods |
Replace one string with another.
replace( old STRING, new STRING, occ INTEGER )
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