TextSegment::Grapheme::Graphemes
Inherits Iterator / Enumerable / Struct / Value / Object
Graphemes implements an iterator over Unicode extended grapheme clusters, specified in the Unicode Standard Annex #29. Grapheme clusters correspond to "user-perceived characters". These characters often consist of multiple code points (e.g. the "woman kissing woman" emoji consists of 8 code points: woman + ZWJ + heavy black heart (2 code points) + ZWJ + kiss mark + ZWJ + woman) and the rules described in Annex #29 must be applied to group those code points into clusters perceived by the user as one character.
Constructors
Instance methods
Returns the next element in this iterator, or Iterator::Stop::INSTANCE if there
are no more elements.
Reset puts the iterator into its initial state such that the next call to
next() sets it to the first grapheme cluster again.