Module HString

module HString: sig .. end
Perfect shared strings by hashconsing
Author(s): Christoph Sticksel

type t 
Hashconsed string

Hashtables, maps and sets


val compare : t -> t -> int
Comparison function on hashconsed strings
val equal : t -> t -> bool
Equality function on hashconsed strings
val hash : t -> int
Hashing function on hashconsed strings
module HStringHashtbl: Hashtbl.S  with type key = t
Hash table over hashconsed strings
module HStringSet: Set.S  with type elt = t
Set over hashconsed strings
module HStringMap: Map.S  with type key = t
Map over hashconsed strings

Constructor


val mk_hstring : string -> t
Hashcons a string
val import : t -> t
Import a string from a different instance into this hashcons table

String functions

Omitted functions from the String module in the standard library:

Modified signature:


val length : t -> int
val get : t -> int -> char
val set : t -> int -> char -> t
val create : int -> t
val make : int -> char -> t
val sub : t -> int -> int -> string
val fill : t -> int -> int -> char -> t
val blit : t -> int -> t -> int -> int -> t
val concat : t -> t list -> t
val iter : (char -> unit) -> t -> unit
val iteri : (int -> char -> unit) -> t -> unit
val map : (char -> char) -> t -> t
val trim : t -> t
val escaped : t -> t
val index : t -> char -> int
val rindex : t -> char -> int
val index_from : t -> int -> char -> int
val rindex_from : t -> int -> char -> int
val contains : t -> char -> bool
val contains_from : t -> int -> char -> bool
val rcontains_from : t -> int -> char -> bool
val uppercase : t -> t
val lowercase : t -> t
val capitalize : t -> t
val uncapitalize : t -> t

Pretty-printing


val pp_print_hstring : Format.formatter -> t -> unit
Pretty-print a hashconsed string
val print_hstring : t -> unit
Pretty-print a hashconsed term to the standard formatter
val string_of_hstring : t -> string
Return the string