mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-08 12:15:32 -05:00
fix CCUnix.escape_str
This commit is contained in:
parent
6fb26288ad
commit
1da809c596
2 changed files with 3 additions and 3 deletions
|
|
@ -50,7 +50,7 @@ let rec iter_gen f g = match g() with
|
||||||
(* print a string, but escaped if required *)
|
(* print a string, but escaped if required *)
|
||||||
let escape_str buf s =
|
let escape_str buf s =
|
||||||
if str_exists s
|
if str_exists s
|
||||||
(function ' ' | '"' | '\'' -> true | _ -> false)
|
(function ' ' | '"' | '\'' | '\n' | '\t'-> true | _ -> false)
|
||||||
then (
|
then (
|
||||||
Buffer.add_char buf '\'';
|
Buffer.add_char buf '\'';
|
||||||
String.iter
|
String.iter
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue