ByteRange.prefix.length.checked: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/scan/ByteRange.bend as ByteRange Lines 106-114 of mylsm-lsm-store@0.6.0.1/src/scan/ByteRange.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/ByteRange.bend&start_line=106&end_line=114 import Base import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes # Rejects prefixes longer than the key before slicing. def prefix.length.checked( key: Bytes.Bytes, prefix: Bytes.Bytes, +prefix_len: U32, +key_len: U32 ) -> Bool: Bool.pick(Bool, U32.is_le(prefix_len, key_len), prefix.slice(key, prefix, prefix_len), False{}) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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 https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/ByteRange.bend&name=prefix.slice