diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2006-02-07 22:09:32 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2006-02-07 22:09:32 +0000 |
commit | b4d90fd1babe9a78dae9431aa466a197625bf3d6 (patch) | |
tree | 376e17a5db3cb833e607279de33ed8bd18bd1eb7 | |
parent | 403d742303d614d1dfa32b0ad4f61757af67fb17 (diff) |
Ajout plural
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@8002 85f007b7-540e-0410-9357-904b9bb8a0f7
-rw-r--r-- | lib/util.ml | 2 | ||||
-rw-r--r-- | lib/util.mli | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/util.ml b/lib/util.ml index 4f64b3a6e..953c8187e 100644 --- a/lib/util.ml +++ b/lib/util.ml @@ -99,6 +99,8 @@ let string_string_contains ~where ~what = with Not_found -> false +let plural n s = if n>1 then s^"s" else s + (* string parsing *) let parse_loadpath s = diff --git a/lib/util.mli b/lib/util.mli index 6fbe23c28..9497f9a4d 100644 --- a/lib/util.mli +++ b/lib/util.mli @@ -68,6 +68,7 @@ val explode : string -> string list val implode : string list -> string val string_index_from : string -> int -> string -> int val string_string_contains : where:string -> what:string -> bool +val plural : int -> string -> string val parse_loadpath : string -> string list |