def chunk.size.of

emerging-ezhttp@0.21.0.0 · src/http.bend:296

import emerging-ezhttp@0.21.0.0/src/http.bend as Http
import Base

296# a chunk-size line once it is known whether its size is hex
297def chunk.size.of(+before: String, ok: Bool) -> Size:
298  match ok:
299    case False{}:
300      SizeBad{"chunk size is not hexadecimal"}
301    case True{}:
302      +n = hexlen(before)
303      chunk.size.n(n, Nat.is_eq(n, 0n))

Uses (6)

Used by (1)