def chunks.ended.hex
import emerging-ezhttp@0.21.0.0/src/http.bend as Httpimport Base
1320# a chunk header: a size that is not hex ends the read (the parse rejects it)
1321def chunks.ended.hex(+before: String, +after: String, ok: Bool,
1322 rest: Cut -> Bool) -> Bool:
1323 match ok:
1324 case False{}:
1325 True{}
1326 case True{}:
1327 +n = hexlen(before)
1328 chunks.ended.size(after, n, Nat.is_eq(n, 0n), rest)