def fields.cut.if

bend-toon-codec@0.1.0.0 · src/hdr.bend:91

import bend-toon-codec@0.1.0.0/src/hdr.bend as Hdr
import Base

91def fields.cut.if(+missing: Bool, +n: U32, +d: U32, +s: String, +i: U32) -> Result<&2, &2, String, Hdr>:
92  match missing:
93    case True{}:
94      bad("unterminated field list")
95    case False{}:
96      fields.after(n, d, String.take(s, U32.to_nat(i)), String.drop(s, U32.to_nat((i + 1 : U32))))

Uses (11)

Used by (1)