> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# charAt

> Use the charAt task to return the character at a given index position in a string.

The `charAt` task returns a character at a given index. The index of the first character in the string is `0`, the second character is `1`, and so on. When the index value is specified, the return result will be the character at that index location in the string.

## Potential use case

Suppose you have a long list of numbers and you want to verify that a certain number is located at a certain position in the index. You could use the `charAt` task for that validation.

## Properties

| Incoming | Type   | Description                                   |
| -------- | ------ | --------------------------------------------- |
| `str`    | String | Required. The string to get a character from. |
| `index`  | Number | Required. The index to get the character at.  |

| Outgoing    | Type   | Description                                  |
| ----------- | ------ | -------------------------------------------- |
| `character` | String | The single character at the specified index. |

## Example

In this example:

* The `str` reference value is the two-word sentence "Hello World".
* The `index` location is position `1` in the `str`.

![](/_fern-img/a149b32ce707a9213f55d3b8ed2f4127fc3f5057f0d0f0507fd1f183e4c6dee0.webp)

The result of this task returns the letter "e" because the `character` is located in the `1` position of the index. The index starts at `0` and counts up from there.

![](/_fern-img/0eadafb2b290da692f8614036c9aa2931d5369f2248eda7610f801e232125ee5.webp)