def cut.next
import lawful-fields@0.1.1.0/fields.bend as Fieldsimport Base
import lawful-bytes@0.1.1.0/defs.bend as D
import lawful-bytes@0.1.1.0/bytes.bend as B
13# The end of the piece starting at from, searched only when want is set (no
14# scan past the last field asked for; the answer is then unused).
15def cut.next(want: Bool, b: D.Bytes, +from: U32, +to: U32, +sep: U32) -> D.Bytes & U32:
16 match want:
17 case True{}:
18 B.find(b, from, to, sep)
19 case False{}:
20 (b, to)