struct TextSegment::Grapheme::Graphemes
- TextSegment::Grapheme::Graphemes
- Struct
- Value
- Object
Overview
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.
Included Modules
- Iterator(TextSegment::Grapheme::Cluster)
Defined in:
grapheme/grapheme.crConstructors
Instance Method Summary
-
#next
Returns the next element in this iterator, or
Iterator::Stop::INSTANCE
if there are no more elements. -
#reset : Nil
Reset puts the iterator into its initial state such that the next call to
#next()
sets it to the first grapheme cluster again.
Constructor Detail
Instance Method Detail
Returns the next element in this iterator, or Iterator::Stop::INSTANCE
if there
are no more elements.