String.char_code_at

String.char_code_at

String.char_code_at

Function

Reads the Unicode code point at the specified character position.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
indexIntNo0Character subscript, negative numbers will be treated as 0.

Return value

TypeDescription
Int/EmptyReturns the code point integer if the subscript exists; returns Empty if out of bounds.

Example

Notes

  • ASCII characters return the corresponding byte value; non-ASCII characters return Unicode code points.