StorageBytes.utf8.width: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend as StorageBytes Lines 100-103 of mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend&start_line=100&end_line=103 import Base def utf8.width(+scalar: U32) -> U32: Bool.pick(U32, U32.is_le(scalar, 127), 1, Bool.pick(U32, U32.is_le(scalar, 2047), 2, Bool.pick(U32, U32.is_le(scalar, 65535), 3, 4))) Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_le