GraphemeBreak enumv0.1.0

Source
The grapheme break class of a scalar value.
pub enum GraphemeBreak: int32 {
    Any = 0,
    CarriageReturn = 1,
    LineFeed = 2,
    Control = 3,
    Extend = 4,
    ZeroWidthJoiner = 5,
    RegionalIndicator = 6,
    Prepend = 7,
    SpacingMark = 8,
    HangulL = 9,
    HangulV = 10,
    HangulT = 11,
    HangulLV = 12,
    HangulLVT = 13
}

Copy. The ordinals match the generated table and must not be reordered.

Cases

NameValueDescription
Any0Everything with no class of its own.
CarriageReturn1A carriage return, which joins only the line feed after it.
LineFeed2A line feed.
Control3A control character, which stands alone.
Extend4A mark that extends the cluster before it.
ZeroWidthJoiner5The zero-width joiner, which is what glues emoji sequences.
RegionalIndicator6A regional indicator, half of a flag.
Prepend7A prefix that binds to what follows it.
SpacingMark8A spacing mark, kept with what precedes it.
HangulL9A Hangul leading consonant.
HangulV10A Hangul vowel.
HangulT11A Hangul trailing consonant.
HangulLV12A Hangul LV syllable.
HangulLVT13A Hangul LVT syllable.

GraphemeBreakOf

pub func GraphemeBreakOf(scalar: char32) -> GraphemeBreak

The break class of scalar.

Source

Parameters

NameTypeDescription
scalarchar32the scalar value to classify

Returns: its grapheme cluster break property

IsPictographic

pub func IsPictographic(scalar: char32) -> bool

Whether scalar is an extended pictograph: the emoji and everything reserved to become one.

Source

Parameters

NameTypeDescription
scalarchar32the scalar value to test

Returns: whether it has the Extended_Pictographic property