Import with #import "std/grapheme".
IsControl :: (property: s32) -> boolState :: struct { active: bool; valid: bool; previous: s32; regional: s32; pictographic: bool; joined_pictographic: bool; consonant: bool; linker: bool; }Streaming segmentation also supports callers reading segmented or borrowed text without joining it into an allocation.
Step :: struct { state: State; boundary: bool; }Push :: (state: State, scalar: u32, valid: bool) -> StepNext :: (value: string, at: s32) -> s32at must be a cluster boundary. Invalid UTF-8 bytes form individual clusters and reset context. Clamped endpoints always make progress.
Previous :: (value: string, at: s32) -> s32Finds the preceding cluster start, including when at is inside a cluster.
Boundary :: (value: string, at: s32) -> s32Snap a borrowed byte offset down to a complete grapheme boundary.
Count :: (value: string) -> s32