GraphemeBreakProperty
public enum GraphemeBreakPropertyOne 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
case CRCarriage Return (U+000D).
case Control
case ControlOther control characters that always force a break.
case Extend
case ExtendCombining marks and other extending characters.
case L
case LHangul leading consonant jamo (L).
case LF
case LFLine Feed (U+000A).
case LV
case LVHangul precomposed LV syllable.
case LVT
case LVTHangul precomposed LVT syllable.
case Other
case OtherDefault class — anything not in another category.
case Prepend
case PrependPrepended concatenation marks.
case RegionalIndicator
case RegionalIndicatorRegional Indicator codepoints (used to form flag emoji in pairs).
case SpacingMark
case SpacingMarkSpacing combining marks.
case T
case THangul trailing consonant jamo (T).
case V
case VHangul vowel jamo (V).
case ZWJ
case ZWJZero Width Joiner (U+200D).
Methods
func ordinal() -> Int32
func ordinal() -> Int32ImplementsEquatable
Associated Types
type Output = Bool
type Output = BoolMethods
public func equal(to: Self) -> Bool
public func equal(to: Self) -> BoolBridges Equal.equal(to:) to Equatable.isEqual(to:).
public func isEqual(to: GraphemeBreakProperty) -> Bool
public func isEqual(to: GraphemeBreakProperty) -> BoolEquality by ordinal — same variant, same value.
public func notEqual(to: Self) -> Bool
public func notEqual(to: Self) -> BoolDefault !=: delegates to == so there's a single source of truth.
ImplementsMatchable
Methods
public func matches(GraphemeBreakProperty) -> Bool
public func matches(GraphemeBreakProperty) -> BoolMatch form of isEqual for use in pattern matching.
Defined in lang/std/text/unicode/grapheme_tables.ks