Provides the std encoding hex package.
Package: std.encoding.hex
Reachable from entry: no
std/string.mlass→ std/string.ml
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
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
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
function encode(b)Encodes bytes to lowercase hex.
| Parameter | Type | Default | Description |
|---|---|---|---|
b |
dynamic |
— | Second input value. |
Source: std/encoding/hex.ml:42
function encodeUpper(b)Encodes bytes to uppercase hex.
| Parameter | Type | Default | Description |
|---|---|---|---|
b |
dynamic |
— | Second input value. |
Source: std/encoding/hex.ml:48
const HEX_ERR = 210Lower/uppercase hexadecimal encoding plus strict, error-preserving decoding.
Source: std/encoding/hex.ml:24
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