def digits.val.of

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

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

192# a decimal digit's value, or 10 when the character is not a digit
193def digits.val.of(+u: U32) -> U32:
194  Bool.pick(U32, Bool.and(U32.is_ge(u, 48), U32.is_le(u, 57)), U32.sub(u, 48), 10)

Uses (6)

Used by (1)