From 2d05f33f2a7bc1b0d51885b72f7f7332c8522db3 Mon Sep 17 00:00:00 2001 From: Guillaume Bury Date: Tue, 13 Oct 2015 15:04:07 +0200 Subject: [PATCH] New CCPrint.char function --- src/core/CCPrint.ml | 1 + src/core/CCPrint.mli | 1 + 2 files changed, 2 insertions(+) diff --git a/src/core/CCPrint.ml b/src/core/CCPrint.ml index c73dc2ce..e93b3339 100644 --- a/src/core/CCPrint.ml +++ b/src/core/CCPrint.ml @@ -46,6 +46,7 @@ let string buf s = Buffer.add_string buf s let bool buf b = Printf.bprintf buf "%B" b let float3 buf f = Printf.bprintf buf "%.3f" f let float buf f = Buffer.add_string buf (string_of_float f) +let char buf c = Buffer.add_char buf c let list ?(start="[") ?(stop="]") ?(sep=", ") pp buf l = let rec pp_list l = match l with diff --git a/src/core/CCPrint.mli b/src/core/CCPrint.mli index a54f3cb8..ae81b69d 100644 --- a/src/core/CCPrint.mli +++ b/src/core/CCPrint.mli @@ -69,6 +69,7 @@ val string : string t val bool : bool t val float3 : float t (* 3 digits after . *) val float : float t +val char : char t val list : ?start:string -> ?stop:string -> ?sep:string -> 'a t -> 'a list t val array : ?start:string -> ?stop:string -> ?sep:string -> 'a t -> 'a array t