SplitScript reference / Language / utf8
utf8
syntax
field at address as utf8(maxBytes)
Decodes a bounded native UTF-8 string state field.
This is state-layout sugar for a bounded read-and-decode operation, not a string-size type. It follows the complete pointer path, reads at most 4096 bytes once, and stops at the first NUL byte. A required field rejects its candidate when memory cannot be read or the bytes are not valid UTF-8; 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 string field
mapName at 0x1234 as utf8(64)