iter_ranges : Str -> Iter(ByteRange)
Visit half-open byte ranges in source order through Iter.
Grapheme :: # (opaque)
Extended grapheme cluster boundaries and materializers.
The public contract is range-first and implements the default, un-tailored Unicode 17 extended grapheme cluster algorithm.
iter_ranges : Str -> Iter(ByteRange)
Visit half-open byte ranges in source order through Iter.
Collect half-open byte ranges in source order.
Return seamless slices of the source, retaining its backing storage.
Return independently materialized cluster strings.
Grapheme.Cursor :: # (opaque)
Incremental segmentation over scalar-aligned Str chunks.
init : { } -> Cursor
push : Cursor, Str, state, (state, ByteRange -> state) -> Try({ cursor : Cursor, state : state }, Error)
Consume a chunk and fold each irrevocable cluster range into caller state. A chunk boundary is not treated as end of text.
finish : Cursor, state, (state, ByteRange -> state) -> Try({ cursor : Cursor, state : state }, Error)
Mark end of text and emit the final nonempty cluster exactly once.