SplitScript reference / Language / utf16le

utf16le

syntax

field at address as utf16le(maxUtf16Units)

Decodes a bounded native UTF-16LE string state field.

This state-layout sugar follows the complete pointer path, reads at most 2048 little-endian UTF-16 code units once, and stops at the first NUL code unit. Unpaired surrogate code units become the Unicode replacement character. A required field rejects its candidate when memory cannot be read; an explicitly annotated optional String (T?) field observes that failure as None. Without the optional annotation, the field type is inferred as String.

Examples

Decode a native UTF-16LE field

chapterName at 0x2345 as utf16le(64)