std/encoding/hex

Types

DecodeError

pub type DecodeError = {
    pub text String
}

DecodeError.message

pub fn DecodeError.message(self) -> String

Functions

encode

pub pure fn encode(data: Bytes) -> String

Two lower-case digits per byte.

decode

pub pure fn decode(text: String) -> Result[Bytes, DecodeError]

Bytes of a hexadecimal string; both cases are accepted. An odd length or a character outside 0-9a-fA-F is an error.