String
class string
Module: System
Assembly: System.Runtime.dll
Source file: String.rvn
Inheritance: Object → String
Implements: ComparableTo<String>, EquatableTo<String>, Sequence<Character>
Immutable Unicode text stored as UTF-8, with grapheme-based length and iteration.
Remarks
Development API. Object equality and hashing use canonical Unicode 17 identity; display preserves original UTF-8 bytes. Internal value copies share immutable UTF-8 text; Object conversions still allocate wrappers. Reference identity follows the shared immutable text owner, including through Object/interface conversions. Separately constructed equal text is distinct. Explicit String.Intern shares exact stored spellings within one execution; literals are not automatically interned. Construct from a Sequence<Char>, literals or text APIs; the parameterless scaffold constructor is not supported. String implements Sequence<Char>. Length and indexing count extended graphemes; Collection<Char>.Count is implemented explicitly and is available through the interface, not as String.Count. Text operations require non-null text; canonical equality does not perform case folding or linguistic collation.