Encoding.utf8.cont.in: def of bend-kit-encoding@0.5.0.0 Import: import bend-kit-encoding@0.5.0.0/encoding.bend as Encoding Lines 108-114 of bend-kit-encoding@0.5.0.0/encoding.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-encoding@0.5.0.0/encoding.bend&start_line=108&end_line=114 import Base # WHATWG: a byte that breaks a sequence yields U+FFFD and is read again as a lead. def utf8.cont.in(+need: U32, cp: U32, +b: U32, out: String, ok: Bool) -> Utf8: match ok: case True{}: utf8.more((need - 1 : U32), (cp * 64 + U32.and(b, 63) : U32), out, U32.is_eq(need, 1)) case False{}: utf8.lead(b, utf8.bad(out), U32.is_lt(b, 128)) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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.and 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.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=bend-kit-encoding@0.5.0.0/encoding.bend&name=Utf8 https://jend.leeeet.dev/definition.txt?path=bend-kit-encoding@0.5.0.0/encoding.bend&name=utf8.bad https://jend.leeeet.dev/definition.txt?path=bend-kit-encoding@0.5.0.0/encoding.bend&name=utf8.lead https://jend.leeeet.dev/definition.txt?path=bend-kit-encoding@0.5.0.0/encoding.bend&name=utf8.more