Module hex
Authors: Serge Aleynikov (saleyn@gmail.com).
Description
Hexadecimal conversion functionsFunction Index
dehex/1 | Convert a hex digit in range [$0..$9,$a..$f,$A..$F] to integer. |
hex/1 | Convert an integer to a hex digit in range [0..15]. |
to_bin/1 | Convert a hex string to binary. |
to_hex/1 | Convert an iolist to a hex string. |
to_int/1 | Convert a hex string/binary to integer. |
Function Details
dehex/1
dehex(C :: char()) -> integer()
Convert a hex digit in range [$0..$9,$a..$f,$A..$F] to integer.
hex/1
hex(C :: integer()) -> char()
Convert an integer to a hex digit in range [0..15].
to_bin/1
to_bin(Bin :: string()) -> binary()
Convert a hex string to binary.
to_hex/1
to_hex(I :: integer() | iolist()) -> binary()
Convert an iolist to a hex string.
to_int/1
to_int(S :: string() | binary()) -> integer()
Convert a hex string/binary to integer.