text

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 CharacterSet

A reusable character-membership policy for trimming and classification.

struct TextCursor

A grapheme-aware cursor over an immutable string or substring snapshot.