Immutable UTF-8 text with canonical language type Str (String is an alias).
Signature
Clones share an Arc allocation. Concatenation creates a new value without implicit conversion. len, indexing, and slices count Unicode scalar values, while allocation limits count UTF-8 bytes. utf8 encodes to Bin and decode validates Bin as UTF-8. Text is the separate visible scene component.
Methods
Examples
Read existing source
The compatibility spelling resolves to the same immutable text type.
main.kj
Loading…Drag to orbit · select to inspect
0 entities
Scene controls
Results
Loading the language runtime…
Output 0
No output.
State
Compile source to inspect its values.
TraceNo execution yet
- Executed source spans appear here.
Expected output
text
Rust definition
Compatibility spelling of Str; new source uses Str.
View Rust documentation →Support: runtime