def probe.if

bend-kit-regex@0.8.0.0 · regex.bend:1410

import bend-kit-regex@0.8.0.0/regex.bend as Regex
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

1410# Past len counts as a hit, so a skip stops there.
1411def probe.if(ok: Bool, a: Array<U32>, +k: U32, +m: Asc) -> Array<U32> & Bool:
1412  match ok:
1413    case True{}:
1414      probe.of(m, Bytes.peek(a, k))
1415    case False{}:
1416      (a, True{})

Uses (8)

Used by (1)