# charAt {#charat}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`charAt(X, Y)`

## Arguments {#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 {#details}

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

## Examples {#examples}

```
s=charAt("abc",2);
s;
// output: 'c'

typestr(s);
// output: CHAR

charAt(["hello","world"],[3,4]);
// output: ['l','d']
```

