aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/cString.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cString.ml')
-rw-r--r--lib/cString.ml11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/cString.ml b/lib/cString.ml
index fd375c5c3..b34b21957 100644
--- a/lib/cString.ml
+++ b/lib/cString.ml
@@ -58,6 +58,8 @@ sig
val ordinal : int -> string
val split : char -> string -> string list
val is_sub : string -> string -> int -> bool
+ module Set : Set.S with type elt = t
+ module Map : Map.S with type key = t
end
include String
@@ -167,3 +169,12 @@ let split c s =
| Not_found -> [String.sub s n (len-n)]
in
if Int.equal len 0 then [] else split 0
+
+module Self =
+struct
+ type t = string
+ let compare = compare
+end
+
+module Set = Set.Make(Self)
+module Map = Map.Make(Self)