* http://helm.cs.unibo.it/
*)
+open Printf
+
let is_dir fname = (Unix.stat fname).Unix.st_kind = Unix.S_DIR
let is_regular fname = (Unix.stat fname).Unix.st_kind = Unix.S_REG
let is_proof_script fname = true (** TODO Zack *)
let is_proof_object fname = true (** TODO Zack *)
+let append_phrase_sep s =
+ if not (Pcre.pmatch ~pat:(sprintf "%s$" BuildTimeConf.phrase_sep) s) then
+ s ^ BuildTimeConf.phrase_sep
+ else
+ s
+
+let strip_trailing_blanks =
+ let rex = Pcre.regexp "\\s*$" in
+ fun s -> Pcre.replace ~rex s
+