Skip to content

Latest commit

 

History

History
124 lines (76 loc) · 2.74 KB

File-std-encoding-hex-ml-900742095.md

File metadata and controls

124 lines (76 loc) · 2.74 KB

std/encoding/hex.ml

Home · Files

Provides the std encoding hex package.

Package: std.encoding.hex

Reachable from entry: no

Imports

Declarations

decode

function decode(s)

Decodes a hex string to bytes.

Parameter Type Default Description
s dynamic — Value supplied for s.

Source: std/encoding/hex.ml:58

decodeOr

function decodeOr(s, fallbackBytes)

Decodes a hex string or returns fallback bytes.

Parameter Type Default Description
s dynamic — Value supplied for s.
fallbackBytes dynamic — Value supplied for fallbackBytes.

Source: std/encoding/hex.ml:72

decodeOrError

function decodeOrError(s)

Decodes a hex string or returns an error on failure.

Parameter Type Default Description
s dynamic — Value supplied for s.

Source: std/encoding/hex.ml:83

encode

function encode(b)

Encodes bytes to lowercase hex.

Parameter Type Default Description
b dynamic — Second input value.

Source: std/encoding/hex.ml:42

encodeUpper

function encodeUpper(b)

Encodes bytes to uppercase hex.

Parameter Type Default Description
b dynamic — Second input value.

Source: std/encoding/hex.ml:48

HEX_ERR

const HEX_ERR = 210

Lower/uppercase hexadecimal encoding plus strict, error-preserving decoding.

Source: std/encoding/hex.ml:24

isValid

function isValid(s)

Checks whether a hex string is valid.

Parameter Type Default Description
s dynamic — Value supplied for s.

Source: std/encoding/hex.ml:64