mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
CCFormat: add space, break, cut aliases
This commit is contained in:
parent
d5f2c6b861
commit
b1643cfbd5
2 changed files with 12 additions and 0 deletions
|
|
@ -41,6 +41,9 @@ let nativeint fmt n = Format.fprintf fmt "%nd" n
|
||||||
let string_quoted fmt s = Format.fprintf fmt "\"%s\"" s
|
let string_quoted fmt s = Format.fprintf fmt "\"%s\"" s
|
||||||
let flush = Format.pp_print_flush
|
let flush = Format.pp_print_flush
|
||||||
|
|
||||||
|
let space = Format.pp_print_space
|
||||||
|
let cut = Format.pp_print_cut
|
||||||
|
let break fmt (m, n) = Format.pp_print_break fmt m n
|
||||||
let newline = Format.pp_force_newline
|
let newline = Format.pp_force_newline
|
||||||
|
|
||||||
let substring out (s,i,len): unit =
|
let substring out (s,i,len): unit =
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,15 @@ val exn : exn printer
|
||||||
(** Printer using {!Printexc.to_string}.
|
(** Printer using {!Printexc.to_string}.
|
||||||
@since 3.0 *)
|
@since 3.0 *)
|
||||||
|
|
||||||
|
val space : unit printer
|
||||||
|
(** Alias to {!pp_print_space}. *)
|
||||||
|
|
||||||
|
val cut : unit printer
|
||||||
|
(** Alias to {!pp_print_cut}. *)
|
||||||
|
|
||||||
|
val break : (int * int) printer
|
||||||
|
(** Tuple-ized {!printer} form of {!pp_print_break}. *)
|
||||||
|
|
||||||
val newline : unit printer
|
val newline : unit printer
|
||||||
(** Force newline (see {!Format.pp_force_newline}).
|
(** Force newline (see {!Format.pp_force_newline}).
|
||||||
@since 1.2 *)
|
@since 1.2 *)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue