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
Join and measure text
The accented character counts as one scalar value even though it uses two UTF-8 bytes.
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
hello café 4
Rust definition
Value::Text(konjure_sdk::data::Str); shared immutable UTF-8 text.
View Rust documentation →Support: runtime