mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2026-03-07 21:27:55 -05:00
Compare commits
2 commits
bc9f361e56
...
aba4c79625
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aba4c79625 | ||
|
|
08e8fd3d54 |
2 changed files with 8 additions and 2 deletions
|
|
@ -398,7 +398,10 @@ let sprintf_ c format =
|
||||||
Format.kfprintf
|
Format.kfprintf
|
||||||
(fun _fmt ->
|
(fun _fmt ->
|
||||||
Format.pp_print_flush fmt ();
|
Format.pp_print_flush fmt ();
|
||||||
Buffer.contents buf)
|
let s = Buffer.contents buf in
|
||||||
|
Buffer.reset buf;
|
||||||
|
(* in case of reuse *)
|
||||||
|
s)
|
||||||
fmt format
|
fmt format
|
||||||
|
|
||||||
let with_color_ksf ~f s fmt =
|
let with_color_ksf ~f s fmt =
|
||||||
|
|
|
||||||
|
|
@ -410,4 +410,7 @@ q
|
||||||
;;
|
;;
|
||||||
|
|
||||||
t @@ fun () -> "ab" < "abc";;
|
t @@ fun () -> "ab" < "abc";;
|
||||||
t @@ fun () -> "123" < "14"
|
t @@ fun () -> "123" < "14";;
|
||||||
|
|
||||||
|
eq ~printer:Fun.id "a,b,c,d,e,f,g,"
|
||||||
|
(flat_map (CCFormat.sprintf "%c,") "abcdefg")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue