Module mochihex

Utilities for working with hexadecimal strings.

Copyright © 2006 Mochi Media, Inc.

Authors: Bob Ippolito (bob@mochimedia.com).

Description

Utilities for working with hexadecimal strings.

Data Types

iodata()

iodata() = iolist() | binary()

iolist()

iolist() = [char() | binary() | iolist()]

Function Index

dehex/1Convert a hex digit to its integer value.
hexdigit/1Convert an integer less than 16 to a hex digit.
test/0Test this module.
to_bin/1Convert a hexadecimal string to a binary.
to_hex/1Convert an iolist to a hexadecimal string.
to_int/1Convert a hexadecimal string to an integer.

Function Details

dehex/1

dehex(C::char()) -> integer()

Convert a hex digit to its integer value.

hexdigit/1

hexdigit(C::integer()) -> char()

Convert an integer less than 16 to a hex digit.

test/0

test() -> ok

Test this module.

to_bin/1

to_bin(L::string()) -> binary()

Convert a hexadecimal string to a binary.

to_hex/1

to_hex(I::integer | iolist()) -> string()

Convert an iolist to a hexadecimal string.

to_int/1

to_int(L::string()) -> integer()

Convert a hexadecimal string to an integer.


Generated by EDoc, Aug 8 2008, 22:08:28.