charAt

Syntax

charAt(X, Y)

Arguments

X is a STRING scalar/vector.

Y is an integer scalar/vector. If Y is a vector, it must be of the same length as X.

Details

Return the character in X at the position specified by Y. The result is a scalar/vector of data type CHAR.

Examples

$ s=charAt("abc",2);
$ s;
'c'

$ typestr(s);
CHAR

$ charAt(["hello","world"],[3,4]);
['l','d']