def from_hex

bend-kit-bytes@0.3.3.0 · bytes.bend:682

import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes
import Base

682# Hex digits, either case, to bytes. None for an odd count or a non-hex char.
683def from_hex(+s: String) -> Maybe<&1, Bytes>:
684  +n = count(s, 0)
685  unhex.if(U32.is_eq((n .&. 1 : U32), 0), s, n)

Uses (8)

Used by (23)