package pp-binary-ints

  1. Overview
  2. Docs
Pretty Printing Binary Integers

Install

Dune Dependency

Authors

Maintainers

Sources

pp-binary-ints-1.0.0.tbz
sha256=4840fc294cf861bddecdbb3218f0ef26d37d2207d45a45d19d01f14e5528cd1b
sha512=123ec3a792e5148d324ac1406d62fcee798af8ec7a75d23986ac18018ea816d954a71e01d8edbb734fb9f5855686f63e22765da49c72802e67acb9749e6d6616

doc/pp-binary-ints/Pp_binary_ints/Flags/index.html

Module Pp_binary_ints.FlagsSource

The Flags module contains types to modify how binary integers are printed.

Sourcetype padding =
  1. | Left
  2. | Right
  3. | Zeros
    (*

    padding controls whether spaces are are added on the left or right or if zero prefixes are added.

    *)
Sourcetype zero_printing =
  1. | OCaml
  2. | InheritNonZero
    (*

    zero_printing controls whether zeros printed similar to how Printf prints zeros or if zeros are printed similar to non-zero integers.

    *)
Sourcetype flags = {
  1. padding : padding;
  2. separators : bool;
  3. prefix_non_zero : bool;
  4. suffix : bool;
  5. zero_printing : zero_printing;
}

flags are passed to pretty printing functions to customize the output.

Sourceval default : flags

A default set of flags.

Sourceval make_flags : ?zero_padding:bool -> ?left_padding:bool -> ?separators:bool -> ?prefix:bool -> ?suffix:bool -> ?zero_special:bool -> unit -> flags

A function for creating flags. The left_padding prameter is ignored if zero_padding is set to true. The default values are as follows.

  • zero_padding=true
  • left_padding=false
  • separators=true
  • prefix=true
  • suffix=true
  • zero_special=false
OCaml

Innovation. Community. Security.