def hex.digit

bend-kit-sigv4@0.11.0.1 · sigv4.bend:603

import bend-kit-sigv4@0.11.0.1/sigv4.bend as Sigv4
import Base

603def hex.digit(+c: U32) -> Maybe<&2, U32>:
604  Bool.pick(Maybe<&2, U32>, Bool.and(U32.is_le(48, c), U32.is_le(c, 57)), Some{(c - 48 : U32)},
605    Bool.pick(Maybe<&2, U32>, Bool.and(U32.is_le(97, c), U32.is_le(c, 102)), Some{(c - 87 : U32)},
606      Bool.pick(Maybe<&2, U32>, Bool.and(U32.is_le(65, c), U32.is_le(c, 70)), Some{(c - 55 : U32)}, None{})))

Uses (6)

Used by (1)