The StringBuffer class / base.StringBuffer methods |
Return the character at a specified position.
getCharAt( position INTEGER ) RETURNING result STRING
The getCharAt() method returns the character from the string buffer at the position that you specify.
The first character position is 1.
The method returns NULL if the position is lower as 1 or greater as the length of the string.
DEFINE buf base.StringBuffer LET buf = base.StringBuffer.create() CALL buf.append("abcdef") DISPLAY buf.getCharAt(3) -- Shows c