> 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.

# codePointAt

> Use the codePointAt task to retrieve the Unicode code point value of a character at a specific position in a string.

The `codePointAt` task retrieves the Unicode value for a character at a specific position in a string. The result is a non-negative integer representing the code point value of the character at the given position.

## Potential use case

This task helps with multilingual text and localization. If you have a dataset containing unique language characters, use `codePointAt` to return the code point value for each character and handle them according to the Unicode standard.

## Properties

| Incoming | Type   | Description                                                                                                                                      |
| :------- | :----- | :----------------------------------------------------------------------------------------------------------------------------------------------- |
| `str`    | String | Required. The string to get the Unicode value from.                                                                                              |
| `pos`    | Number | The position of the character in `str` to return the code point value for. The first character is at position `0`, the second at `1`, and so on. |

| Outgoing         | Type   | Description                                                                                                                      |
| :--------------- | :----- | :------------------------------------------------------------------------------------------------------------------------------- |
| `codePointValue` | Number | The Unicode code point value of the character at the given `pos`. Returns `undefined` if there is no character at that position. |

## Example

The incoming `str` is `"Hello World"` and the `pos` is `1`, which corresponds to the letter `"e"`.

The first character position is `0`, the second is `1`, and so on.

![](/_fern-img/4a07b4bdc7c2d9f88c850e63dc1627e6f81ad8019a43189ed824f4fffc3bc460.webp)

The `codePointValue` returned is `101`, which is the Unicode value for the lowercase letter `"e"`.

![](/_fern-img/9d1abef39c9f13c105b77f396d88c960846740020ce1e5cb15698512da8b7276.webp)