def hex.val.lower

ezx@1.11.0.0 · src/sha/nar.bend:172

import ezx@1.11.0.0/src/sha/nar.bend as Nar
import Base

172def hex.val.lower(is_lower: Bool, +code: U32) -> U32:
173  match is_lower:
174    case True{}:
175      U32.sub(code, 87)
176    case False{}:
177      hex.val.upper(Bool.and(U32.is_ge(code, 65), U32.is_le(code, 70)), code)

Uses (7)

Used by (1)