aboutsummaryrefslogtreecommitdiff
path: root/lib/cString.mli
diff options
context:
space:
mode:
authorppedrot2012-12-13 15:59:59 +0000
committerppedrot2012-12-13 15:59:59 +0000
commit0a7347b567d6ea5d71907b570c81ea6dc61a626d (patch)
tree4dd25cc9d1d53f9bb539c6d7c9eebcd36ed59b63 /lib/cString.mli
parent989d7d5f4d3d023704935f2db49090b9ac4b2e13 (diff)
Documented CString.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16064 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/cString.mli')
-rw-r--r--lib/cString.mli29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/cString.mli b/lib/cString.mli
index 1d33cef39b..9f4a47f19d 100644
--- a/lib/cString.mli
+++ b/lib/cString.mli
@@ -47,17 +47,46 @@ end
module type ExtS =
sig
include S
+ (** We include the standard library *)
+
external equal : string -> string -> bool = "caml_string_equal" "noalloc"
+ (** Equality on strings *)
+
+ val is_empty : string -> bool
+ (** Test whether a string is empty. *)
+
val explode : string -> string list
+ (** [explode "x1...xn"] returns [["x1"; ...; "xn"]] *)
+
val implode : string list -> string
+ (** [implode [s1; ...; sn]] returns [s1 ^ ... ^ sn] *)
+
val strip : string -> string
+ (** Remove the surrounding blank characters from a string *)
+
val map : (char -> char) -> string -> string
+ (** Apply a function on a string character-wise. *)
+
val drop_simple_quotes : string -> string
+ (** Remove the eventual first surrounding simple quotes of a string. *)
+
val string_index_from : string -> int -> string -> int
+ (** As [index_from], but takes a string instead of a char as pattern argument *)
+
val string_contains : where:string -> what:string -> bool
+ (** As [contains], but takes a string instead of a char as pattern argument *)
+
val plural : int -> string -> string
+ (** [plural n s] adds a optional 's' to the [s] when [2 <= n]. *)
+
val ordinal : int -> string
+ (** Generate the ordinal number in English. *)
+
val split : char -> string -> string list
+ (** [split c s] splits [s] into sequences separated by [c], excluded. *)
+
+ val is_sub : string -> string -> int -> bool
+ (** [is_sub p s off] tests whether [s] contains [p] at offset [off]. *)
end
include ExtS