Unicode.brk: def of bend-kit-unicode@0.1.0.0 Import: import bend-kit-unicode@0.1.0.0/unicode.bend as Unicode Lines 177-188 of bend-kit-unicode@0.1.0.0/unicode.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-unicode@0.1.0.0/unicode.bend&start_line=177&end_line=188 import Base # UAX #29 GB3-GB13. ri: the regional indicators before q are odd in number. # ep: 1 after ExtPict Extend*, 2 after ExtPict Extend* ZWJ. # incb: 1 after an InCB consonant and extenders, 2 once a linker follows it. def brk(+p: U32, +q: U32, +ri: Bool, +ep: U32, +incb: U32) -> Bool: +gp = gcb(p) +gq = gcb(q) +ctl = (U32.is_le(1, gp) && U32.is_le(gp, 3)) || (U32.is_le(1, gq) && U32.is_le(gq, 3)) +glue = hangul.join(gp, gq) || eq(gq, 4) || eq(gq, 5) || eq(gq, 8) || eq(gp, 7) +conj = eq(incb, 2) && eq((q >> 5n : U32), 1) +emoji = eq(ep, 2) && U32.is_ne((q .&. 16 : U32), 0) +flag = eq(gp, 6) && eq(gq, 6) && ri Bool.not((eq(gp, 1) && eq(gq, 2)) || (Bool.not(ctl) && (glue || conj || emoji || flag))) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_ne https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shrn https://jend.leeeet.dev/definition.txt?path=bend-kit-unicode@0.1.0.0/unicode.bend&name=eq https://jend.leeeet.dev/definition.txt?path=bend-kit-unicode@0.1.0.0/unicode.bend&name=gcb https://jend.leeeet.dev/definition.txt?path=bend-kit-unicode@0.1.0.0/unicode.bend&name=hangul.join