x-lang

← Index

x/type/str-utf8

The low-level UTF-8 code-point layer for the STRING type: the list<->str transforms and the bare (s i) code-point indexing handler.

Low-level layer, loaded before the object system. The high-level string API is the Str8 / StrUtf8 classes and the Str entry point in x/type/str.

The %-private byte API (%str-length, %str-ref, %substring) stays byte-level; only the bare (s i) call is code-point aware.

%list->str

Build a UTF-8 string from a list of code-point characters. Inverse of str->list.

Returns: STRING — UTF-8 string encoding each code point

%str->list

Decode a UTF-8 string into a list of code-point characters. Inverse of list->str.

Returns: LIST — List of CHARACTERs, one per Unicode code point