CCFormat: add space, break, cut aliases

This commit is contained in:
Kye Shi 2020-12-12 17:52:12 -08:00 committed by Simon Cruanes
parent d5f2c6b861
commit b1643cfbd5
2 changed files with 12 additions and 0 deletions

View file

@ -41,6 +41,9 @@ let nativeint fmt n = Format.fprintf fmt "%nd" n
let string_quoted fmt s = Format.fprintf fmt "\"%s\"" s
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 substring out (s,i,len): unit =

View file

@ -34,6 +34,15 @@ val exn : exn printer
(** Printer using {!Printexc.to_string}.
@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
(** Force newline (see {!Format.pp_force_newline}).
@since 1.2 *)