shouldBreakBetween

public func shouldBreakBetween(GraphemeBreakProperty, GraphemeBreakProperty, Bool, Bool) -> Bool

Decides whether a grapheme cluster boundary lies between two adjacent codepoints with the given break properties.

Implements the UAX #29 boundary rules GB3–GB13/GB999. The caller must thread two scalar bits across calls to capture rules that look further back than one codepoint:

  • prevPrevWasRI: was the codepoint before prev a Regional_Indicator? Needed to keep regional-indicator pairs together while still breaking between successive pairs (GB12/13).
  • prevWasZWJ: was the codepoint before prev a ZWJ? Needed for the simplified emoji ZWJ-sequence rule (GB11).

Returns true to break (start a new cluster at curr), false to keep prev and curr in the same cluster.

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