From edf7b50418940503747f44375c17f274631ce01c Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Mon, 18 Mar 2024 11:53:39 +0100 Subject: [PATCH] Update ohex doc to 0.2.0. --- doc/index.html | 2 +- doc/ohex/Ohex/index.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/index.html b/doc/index.html index 64d49c0..b9d5de2 100644 --- a/doc/index.html +++ b/doc/index.html @@ -11,7 +11,7 @@

OCaml package documentation

    -
  1. ohex 0.1.0
  2. +
  3. ohex 0.2.0
diff --git a/doc/ohex/Ohex/index.html b/doc/ohex/Ohex/index.html index 90baa3e..2b4c01d 100644 --- a/doc/ohex/Ohex/index.html +++ b/doc/ohex/Ohex/index.html @@ -5,10 +5,10 @@ bytes -> ?off:int -> unit -> - unit

decode_into ~skip_whitespace s dst ~off () decodes s into dst starting at off (defaults to 0). The argument skip_whitespace defaults to true and skips any whitespace characters.

val encode : string -> string

encode s encodes s into a freshly allocated string of double size, where each character in s is encoded as two hex digits in the returned string. An example: encode "AB" = "4142".

val encode_into : string -> bytes -> ?off:int -> unit -> unit

encode_into s dst ~off () encodes s into dst starting at off (defaults to 0). Each character is encoded as two hex digits in dst.

  • raises Invalid_argument

    if dst does not contain enough space.

val pp : + unit

decode_into ~skip_whitespace s dst ~off () decodes s into dst starting at off (defaults to 0). The argument skip_whitespace defaults to true and skips any whitespace characters.

  • raises Invalid_argument

    if any character in s is not a hex character, an odd amount of characters are present, or dst does not contain enough space.

val encode : string -> string

encode s encodes s into a freshly allocated string of double size, where each character in s is encoded as two hex digits in the returned string. An example: encode "AB" = "4142".

val encode_into : string -> bytes -> ?off:int -> unit -> unit

encode_into s dst ~off () encodes s into dst starting at off (defaults to 0). Each character is encoded as two hex digits in dst.

  • raises Invalid_argument

    if dst does not contain enough space.

val pp : Stdlib.Format.formatter -> string -> unit

pp ppf s pretty-prints the string s in hexadecimal. Some spaces are emitted for easier readability. No newline is emitted.

val pp_hexdump : ?row_numbers:bool -> ?chars:bool -> unit -> Stdlib.Format.formatter -> string -> - unit

pp ~row_numbers ~chars () ppf s pretty-prints the string s in hexadecimal (similar to hexdump -C). If row_numbers is provided (defaults to true), each output line is prefixed with the row number. If chars is provided (defaults to true), in the last column the ASCII string is printed (non-printable characters are printed as '.').

+ unit

pp_hexdump ~row_numbers ~chars () ppf s pretty-prints the string s in hexadecimal (similar to hexdump -C). If row_numbers is provided (defaults to true), each output line is prefixed with the row number. If chars is provided (defaults to true), in the last column the ASCII string is printed (non-printable characters are printed as '.').