def find2

lawful-bytes@0.1.1.0 · bytes.bend:112

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

112# The first index j with from <= j < to where byte j is c1 or c2; to if none.
113def find2(b: D.Bytes, +from: U32, +to: U32, +c1: U32, +c2: U32) -> D.Bytes & U32:
114  find2.start(Nat.sub(U32.to_nat(to), U32.to_nat(from)), at(b, from), from, to, c1, c2)

Uses (7)

Used by (9)