def find

lawful-bytes@0.1.1.0 · fast.bend:77

import lawful-bytes@0.1.1.0/fast.bend as Fast
import Base
import lawful-bytes@0.1.1.0/defs.bend as D

77# The first index j with from <= j < to where byte j is c; to if none.
78def find(b: D.Bytes, +from: U32, +to: U32, +c: U32) -> D.Bytes & U32:
79  D.Bytes{+len, buf} = b
80  find.k(len, find.fin(to, find.start(words(from, to), Array.get(U32, buf, (from >> 2n : U32)), from, rep(c))))

Uses (10)

Used by (6)