def bytes.get

gralha-bytes@0.1.0.1 · bytes.bend:52

import gralha-bytes@0.1.0.1/bytes.bend as Bytes
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U

52def bytes.get(bytes: Bytes, +index: U32) -> U32:
53  Bytes{bufTree, size, capacity} = bytes
54  U.branch(U32, U32.is_lt(index, size), _ => bytes.tree.get(bufTree, capacity, index), _ => 0)

Uses (5)

Used by (41)