]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitaMisc.ml
snapshot:
[helm.git] / helm / matita / matitaMisc.ml
index f332fcbd1e684bce9dbbcca5d3d546bfdc033dbb..83bdeb36f6ea3fcd55f6e7effc7635d00fad9ee2 100644 (file)
@@ -23,6 +23,8 @@
  * 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
 
@@ -37,3 +39,9 @@ let input_file fname =
 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
+