Deep, grapheme-safe text algorithms shared by String and Substring. Character-shaped methods only mint and consume opaque StringIndex values; byte offsets remain confined to UTF8View and compatibility search.
API Reference
Protocols
protocol Hashable
A value with a deterministic integer hash suitable for keyed collections.
Structs
struct StringIndex
An opaque grapheme-boundary position tied to one string snapshot.
struct StringRange
A half-open pair of StringIndex values for grapheme-safe slicing.
struct CharacterSet
A reusable character-membership policy for trimming and classification.
struct TextCursor
A grapheme-aware cursor over an immutable string or substring snapshot.