def hex.char

bend-kit-netip@0.1.0.0 · netip.bend:249

import bend-kit-netip@0.1.0.0/netip.bend as Netip
import Base

249# Hex fields contain no leading zeros.
250def hex.char(+n: U32) -> String:
251  SCon{Chr{Bool.pick(U32, U32.is_lt(n, 10), (n + 48 : U32), (n + 87 : U32))}, SNil{}}

Uses (6)

Used by (4)