StringView
StringView is immutable borrowed UTF-8 storage plus byte length.
DByte 12.0 · Language
Contract§
Byte-slice conversion is explicit; reverse conversion validates UTF-8 and returns Result.
Mechanics§
StringView is an immutable two-word const_ptr[u8] plus byte length and guarantees UTF-8 storage validity. A literal materializes as static StringView when that is the expected v12 type.
Validation and failure§
StringView to slice[u8] is explicit; byte slice to StringView validates UTF-8 and returns Result. Version 12 promises byte length, not codepoint or grapheme operations.
Evidence and boundary§
Static rodata inspection and UTF-8 success/failure cases tie textual semantics to the canonical borrowed representation.