def bstr.fit
import bend-kit-cbor@0.3.0.0/cbor.bend as Cborimport Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
522def bstr.fit(ok: Bool, +text: Bool, a: Array<U32>, +n: U32, +i: U32) -> Array<U32> & Maybe<&1, Bytes.Bytes>:
523 match ok:
524 case True{}:
525 bstr.copy(n, i, bstr.valid(text, a, i, (i + n : U32)))
526 case False{}:
527 (a, None{})