StorageBytes.utf8.encode.go: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend as StorageBytes Lines 178-184 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=178&end_line=184 import Base import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes def utf8.encode.go(text: String, cursor: Bytes.Cursor) -> Bytes.Cursor: match text: case SNil{}: cursor case SCon{Chr{+scalar}, tail}: utf8.encode.go(tail, utf8.put.scalar(cursor, scalar, U32.is_le(scalar, 127), U32.is_le(scalar, 2047), U32.is_le(scalar, 65535))) Uses (5): 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.is_le https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Cursor https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/StorageBytes.bend&name=utf8.put.scalar