def bstr.read

bend-kit-cbor@0.3.0.0 · cbor.bend:529

import bend-kit-cbor@0.3.0.0/cbor.bend as Cbor
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

529# A definite string of arg bytes from i. None when it runs past len, or when text is not UTF-8.
530def bstr.read(+text: Bool, +arg: W64, a: Array<U32>, +len: U32, +i: U32) -> Array<U32> & Maybe<&1, Bytes.Bytes>:
531  W64{+hi, +lo} = arg
532  bstr.fit(U32.is_eq(hi, 0) && Bytes.fits(len, i, lo), text, a, lo, i)

Uses (11)

Used by (2)