CCString.equal,compare,hash

This commit is contained in:
Simon Cruanes 2014-05-23 00:13:36 +02:00
parent 1fd7b9fbe0
commit 3ae7c7ca0b
2 changed files with 12 additions and 0 deletions

View file

@ -28,6 +28,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
type t = string type t = string
let equal a b = a=b
let compare = String.compare
let hash s = Hashtbl.hash s
type 'a gen = unit -> 'a option type 'a gen = unit -> 'a option
type 'a sequence = ('a -> unit) -> unit type 'a sequence = ('a -> unit) -> unit

View file

@ -29,6 +29,12 @@ Consider using KMP instead. *)
type t = string type t = string
val equal : t -> t -> bool
val compare : t -> t -> int
val hash : t -> int
type 'a gen = unit -> 'a option type 'a gen = unit -> 'a option
type 'a sequence = ('a -> unit) -> unit type 'a sequence = ('a -> unit) -> unit