# string.getCodePoint

Function · category: Other

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/core/string.js#L152

```ts
getCodePoint(string: string, i?: number): number
```

Get the code point number for a character in a string. Polyfill for
[`codePointAt`][https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt).

**Parameters**

- `string` (`string`): The string to get the code point from.
- `i` (`number`, optional): The index in the string.

**Returns** `number`: The code point value for the character in the string.
