def bare.pick
bend-toon-codec@0.1.0.0 · src/entry.bend:97
import bend-toon-codec@0.1.0.0/src/entry.bend as Entry
import Base
import bend-toon-codec@0.1.0.0/src/hdr.bend as H
97def bare.pick(+strict: Bool, +bfirst: Bool, +nocolon: Bool, +text: String, +ci: U32, +bi: U32) -> Result<&2, &2, String, Ent>:
98 match bfirst nocolon:
99 case True{} _:
100 hdr.at(strict, text, ci, bi, H.parse(String.drop(text, U32.to_nat(bi))))
101 case False{} True{}:
102 Done{ENot{}}
103 case False{} False{}:
104 kv(text, ci)