package core_kernel

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A functor for displaying a type as a sequence of ASCII characters printed in hexadecimal.

sexp_of_t and to_string_hum print t in a similar format to 'hexdump' on Unix systems. For example, the string "Back off, man, I'm a scientist." renders as:

00000000  42 61 63 6b 20 6f 66 66  2c 20 6d 61 6e 2c 20 49  |Back off, man, I|
00000010  27 6d 20 61 20 73 63 69  65 6e 74 69 73 74 2e     |'m a scientist.|
0000001f

to_sequence produces a sequence of strings representing lines in the hex dump. It can be used to process a hex dump incrementally, for example with potentially infinite values, or to avoid keeping the entire output in memory at once.

module type Indexable = Hexdump.Indexable
module type Indexable1 = Hexdump.Indexable1
module type Indexable2 = Hexdump.Indexable2
module type S = Hexdump.S
module type S1 = Hexdump.S1
module type S2 = Hexdump.S2
val default_max_lines : Base.Int.t Base.Ref.t

Can be used to override the default ~lines argument for to_string_hum and to_sequence in S.

module Of_indexable (T : Hexdump.Indexable) : sig ... end
module Of_indexable1 (T : Hexdump.Indexable1) : sig ... end
module Of_indexable2 (T : Hexdump.Indexable2) : sig ... end
OCaml

Innovation. Community. Security.