String is a UTF-8 byte buffer. Byte-level access lives behind the explicit utf8() view; byte_count is the buffer length in BYTES, not user-perceived characters. Equality is byte equality: canonically equivalent strings in different normal forms (NFC "é" vs NFD "é") compare unequal.
API Reference
Protocols
protocol StringMethods
Shared text operations for owned strings, substrings, and static strings.
Structs
struct String
An owned Unicode string with copy-on-write UTF-8 storage.
struct Substring
A borrowed contiguous byte range of an existing UTF-8 string.
struct UTF8View
A borrowed view of raw UTF-8 code units.
struct UTF8Error
A UTF-8 validation failure located at the first malformed byte.
struct Static<Value>
An immutable value whose complete reachable storage has program lifetime. Construction is compiler-owned; source code receives Static values from literals and, later, static declarations.