Unicode.hangul.dec: def of bend-kit-unicode@0.1.0.0 Import: import bend-kit-unicode@0.1.0.0/unicode.bend as Unicode Lines 17-21 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=17&end_line=21 import Base # Hangul syllables decompose and compose by formula (Unicode ยง3.12). def hangul.dec(+s: U32) -> String: +t = (s % 28 : U32) tail = Bool.pick(String, U32.is_eq(t, 0), SNil{}, SCon{Chr{(4519 + t : U32)}, SNil{}}) SCon{Chr{(4352 + (s / 588) : U32)}, SCon{Chr{(4449 + ((s % 588) / 28) : U32)}, tail}} Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Char https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mod