Up

module Hex

: sig

Hexadecimal encoding.

Char

#
val of_char : char -> char * char

of_char c is the the hexadecimal encoding of the character c.

#
val to_char : char -> char -> char

to_char x y is the character correspondong to the xy hexadecimal encoding.

Strings

#
type t = [
| `Hex of string
]

The type of hexadecimal encodings.

#
val of_string : ?pretty:bool -> string -> t

of_string s is the hexadecimal representation of the binary string s. If pretty is set, the hexadecimal is formatted to 80 columms with some space, to ease reading it. The default value of pretty is false)

#
val to_string : t -> string

to_string h is binary string corresponding to the hexadecimal encoding h. The decoding function will skip whitespaces, tabs and newlines.

end