The STRING data type as class / STRING data type methods |
Returns the character at the specified position.
getCharAt( position INTEGER ) RETURNING result CHAR(1)
This method extracts the character at the specified position from the STRING variable.
If the STRING variable is NULL, or if the position is out of the bounds of the string, the result will be NULL.
MAIN DEFINE s STRING LET s = "Some text" DISPLAY s.getCharAt(4) END MAIN