Module String.Set

String sets.

String sets

include Stdlib.Set.S with type Set.elt := string and type Set.t := set
val empty : set
val is_empty : set -> bool
val mem : string -> set -> bool
val add : string -> set -> set
val singleton : string -> set
val remove : string -> set -> set
val union : set -> set -> set
val inter : set -> set -> set
val disjoint : set -> set -> bool
val diff : set -> set -> set
val compare : set -> set -> int
val equal : set -> set -> bool
val subset : set -> set -> bool
val iter : (string -> unit) -> set -> unit
val map : (string -> string) -> set -> set
val fold : (string -> 'a -> 'a) -> set -> 'a -> 'a
val for_all : (string -> bool) -> set -> bool
val exists : (string -> bool) -> set -> bool
val filter : (string -> bool) -> set -> set
val partition : (string -> bool) -> set -> set * set
val cardinal : set -> int
val elements : set -> string list
val min_elt : set -> string
val min_elt_opt : set -> string option
val max_elt : set -> string
val max_elt_opt : set -> string option
val choose : set -> string
val choose_opt : set -> string option
val split : string -> set -> set * bool * set
val find : string -> set -> string
val find_opt : string -> set -> string option
val find_first : (string -> bool) -> set -> string
val find_first_opt : (string -> bool) -> set -> string option
val find_last : (string -> bool) -> set -> string
val find_last_opt : (string -> bool) -> set -> string option
val of_list : string list -> set
val to_seq_from : string -> set -> string Stdlib.Seq.t
val to_seq : set -> string Stdlib.Seq.t
val add_seq : string Stdlib.Seq.t -> set -> set
val of_seq : string Stdlib.Seq.t -> set
type t = set
val min_elt : set -> string option

Exception safe Set.S.min_elt.

val get_min_elt : set -> string

get_min_elt is like min_elt but

raises Invalid_argument

on the empty set.

val max_elt : set -> string option

Exception safe Set.S.max_elt.

val get_max_elt : set -> string

get_max_elt is like max_elt but

raises Invalid_argument

on the empty set.

val choose : set -> string option

Exception safe Set.S.choose.

val get_any_elt : set -> string

get_any_elt is like choose but

raises Invalid_argument

on the empty set.

val find : string -> set -> string option

Exception safe Set.S.find.

val get : string -> set -> string

get is like Set.S.find but

raises Invalid_argument

if elt is not in s.

val of_list : string list -> set

of_list ss is a set from the list ss.

val of_stdlib_set : Stdlib.Set.Make(Stdlib.String).t -> set

of_stdlib_set s is a set from the stdlib-compatible set s.

val to_stdlib_set : set -> Stdlib.Set.Make(Stdlib.String).t

to_stdlib_set s is the stdlib-compatible set equivalent to s.

val pp : ?⁠sep:(Stdlib.Format.formatter -> unit -> unit) -> (Stdlib.Format.formatter -> string -> unit) -> Stdlib.Format.formatter -> set -> unit

pp ~sep pp_elt ppf ss formats the elements of ss on ppf. Each element is formatted with pp_elt and elements are separated by ~sep (defaults to Format.pp_print_cut. If the set is empty leaves ppf untouched.

val dump : Stdlib.Format.formatter -> set -> unit

dump ppf ss prints an unspecified representation of ss on ppf.