Module HString
Perfect shared strings by hashconsing
- author
- Christoph Sticksel
Hashtables, maps and sets
- val hash : t -> int
- Hashing function on hashconsed strings 
- module HStringHashtbl : Stdlib.Hashtbl.S with type HStringHashtbl.key = t
- Hash table over hashconsed strings 
- module HStringSet : Stdlib.Set.S with type HStringSet.elt = t
- Set over hashconsed strings 
- module HStringMap : Stdlib.Map.S with type HStringMap.key = t
- Map over hashconsed strings 
Constructor
- val mk_hstring : string -> t
- Hashcons a string 
String functions
Omitted functions from the String module in the standard library:
- copy: All strings are shared
Modified signature:
- sub: return a string, not a hashconsed string
- fill,- blit: no in-place modifications
- 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 : Stdlib.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