GraphemeBreakProperty

public enum GraphemeBreakProperty

One of the UAX #29 Grapheme_Cluster_Break property values.

Returned by graphemeBreakProperty(c:) and consumed by shouldBreakBetween(...). Variant names match the Unicode property labels — see UAX #29 for the precise definitions and the boundary rules (GB1–GB999) that consume them.

Representation

A 14-state tag enum (no payload). ordinal() gives the numeric encoding used by the stage-2 lookup table.

Cases

case CR

Carriage Return (U+000D).

case Control

Other control characters that always force a break.

case Extend

Combining marks and other extending characters.

case L

Hangul leading consonant jamo (L).

case LF

Line Feed (U+000A).

case LV

Hangul precomposed LV syllable.

case LVT

Hangul precomposed LVT syllable.

case Other

Default class — anything not in another category.

case Prepend

Prepended concatenation marks.

case RegionalIndicator

Regional Indicator codepoints (used to form flag emoji in pairs).

case SpacingMark

Spacing combining marks.

case T

Hangul trailing consonant jamo (T).

case V

Hangul vowel jamo (V).

case ZWJ

Zero Width Joiner (U+200D).

Methods

func ordinal() -> Int32

ImplementsEquatable

Associated Types

type Output = Bool

Methods

public func equal(to: Self) -> Bool

Bridges Equal.equal(to:) to Equatable.isEqual(to:).

public func isEqual(to: GraphemeBreakProperty) -> Bool

Equality by ordinal — same variant, same value.

public func notEqual(to: Self) -> Bool

Default !=: delegates to == so there's a single source of truth.

ImplementsMatchable

Methods

public func matches(GraphemeBreakProperty) -> Bool

Match form of isEqual for use in pattern matching.

Defined in lang/std/text/unicode/grapheme_tables.ks