package pp-binary-ints

  1. Overview
  2. Docs

Module Pp_binary_ints.IntSource

Sourcetype t = int
Sourcemodule Flags : sig ... end

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

Sourceval pp_binary_int : flags:Flags.flags -> min_width:int -> Format.formatter -> int -> unit

pp_binary_int ~flags ~min_width fmt n prints the integer n on the formatter fmt, customizing the output with ~flags. ~min_width pads the output with enough spaces or zeros so that the output is at least ~min_width characters, depends on flags.padding.

Sourceval pp_int : Format.formatter -> int -> unit

pp_binary_int ~flags ~min_width fmt n prints the integer n on the formatter fmt.

Sourceval make_pp_int : ?flags:Flags.flags -> ?min_width:int -> unit -> Format.formatter -> int -> unit

make_pp_int ?flags ?min_width () is just pp_binary_int ~flags ~min_width, but flags and min_width are optional. If omitted default values of Flags.default and 1 are passed to pp_binary_int. This version is nicer to with with the Format or Fmt modules.

Sourceval to_string_with : flags:Flags.flags -> min_width:int -> int -> string

to_string_width ~flags ~min_width n converts the integer n to a binary integer n. customizing the output with ~flags. ~min_width pads the output with enough spaces or zeros so that the output is at least ~min_width characters, depends on flags.padding.

Sourceval to_string : int -> string

to_string n converts the integer n to a binary integer n.

Sourceval make_to_string : ?flags:Flags.flags -> ?min_width:int -> unit -> int -> string

make_to_string ?flags ?min_width () is just to_string_with ~flags ~min_width, but flags and min_width are optional. If omitted default values of Flags.default and 1 are passed to to_string_with.