Atom

text.codepoint()

Reads one scalar's Unicode code point.

Signature

text.codepoint(value)

Parameters

A char or one-scalar string.

Returns

i64 code point.

Behavior

Pairs with convert(char, number).

Errors

Empty text, more than one scalar, or wrong type.

Example

Atom
use text
assert(text.codepoint('🐈') == 128008)