DecodeUtf16.scalar: def of bendvy-ecs-core@0.1.0.3 Import: import bendvy-ecs-core@0.1.0.3/decode_utf16.bend as DecodeUtf16 Lines 20-23 of bendvy-ecs-core@0.1.0.3/decode_utf16.bend: https://jend.leeeet.dev/read.txt?path=bendvy-ecs-core@0.1.0.3/decode_utf16.bend&start_line=20&end_line=23 import Base def scalar(+code:U32,rest:List<&2,U32>,bmp:Bool) -> List<&2,U32>: match bmp: case True{}: code <> rest case False{}: U32.add(55296,U32.div(U32.sub(code,65536),1024)) <> U32.add(56320,U32.mod(U32.sub(code,65536),1024)) <> rest Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List 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.mod https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub