The StringBuffer class / base.StringBuffer methods |
Replace part of a string with another string.
replaceAt( start INTEGER, length INTEGER, new STRING )
The replaceAt() method replaces part of the current string with another string.
The parameters are integers indicating the position at which the replacement should start, the number of characters to be replaced, and the replacement string.
The first position in the string is 1.
CALL buf.append("abxxxxef") CALL buf.replaceAt(3,4,"cd") DISPLAY buf.toString() -- Shows abcdef