package camomile

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Type.USetSource

Sets of Unicode characters, implemented as sets of intervals. The signature is mostly same to Set.S in stdlib

Sourcetype t
Sourceval empty : t
Sourceval is_empty : t -> bool
Sourceval mem : CamomileLib.UChar.t -> t -> bool
Sourceval add : CamomileLib.UChar.t -> t -> t

add_range u1 u2 s adds the characters in the range u1 - u2 to s. The range is determined by the code point order.

Sourceval singleton : CamomileLib.UChar.t -> t
Sourceval remove : CamomileLib.UChar.t -> t -> t
Sourceval remove_range : CamomileLib.UChar.t -> CamomileLib.UChar.t -> t -> t

remove_range u1 u2 s removes the characters in the range u1 - u2 from s. The range is determined by the code point order.

Sourceval union : t -> t -> t
Sourceval inter : t -> t -> t
Sourceval diff : t -> t -> t
Sourceval compl : t -> t

compl s returns the compliment of s.

Sourceval compare : t -> t -> int
Sourceval equal : t -> t -> bool
Sourceval subset : t -> t -> bool
Sourceval from : CamomileLib.UChar.t -> t -> t

from u s returns the set of elements of s whose code points are equal or greater than u.

Sourceval after : CamomileLib.UChar.t -> t -> t

after u s returns the set of elements of s whose code points are greater than u.

Sourceval until : CamomileLib.UChar.t -> t -> t

until u s returns the set of elements of s whose code points are equal or smaller than u.

Sourceval before : CamomileLib.UChar.t -> t -> t

until u s returns the set of elements of s whose code points are smaller than u.

Sourceval iter : (CamomileLib.UChar.t -> unit) -> t -> unit
Sourceval iter_range : (CamomileLib.UChar.t -> CamomileLib.UChar.t -> unit) -> t -> unit

iter_range proc s feeds the intervals contained in s to proc in increasing order. The intervals given to proc are always separated by the character not in s.

Sourceval fold : (CamomileLib.UChar.t -> 'a -> 'a) -> t -> 'a -> 'a
Sourceval fold_range : (CamomileLib.UChar.t -> CamomileLib.UChar.t -> 'a -> 'a) -> t -> 'a -> 'a

fold_range f s x is equivalent to f u_i u_(i+1) (... (f u_3 u_4 (f u_1 u_2 x))) if s is consisted of the intervals u1-u2, u3-u4, ..., u_i-u_(i + 1) in increasing order. The intervals given to proc are always separated by the character not in s.

Sourceval for_all : (CamomileLib.UChar.t -> bool) -> t -> bool
Sourceval exists : (CamomileLib.UChar.t -> bool) -> t -> bool
Sourceval filter : (CamomileLib.UChar.t -> bool) -> t -> t
Sourceval partition : (CamomileLib.UChar.t -> bool) -> t -> t * t
Sourceval cardinal : t -> int
Sourceval elements : t -> CamomileLib.UChar.t list

The list of the intervals contained in the set. The returned intervals are always separated by the character not in s.

Sourceval min_elt : t -> CamomileLib.UChar.t
Sourceval max_elt : t -> CamomileLib.UChar.t

Returns a element roughly in the middle of the set. It is not guaranteed to return the same element for the sets with the same elements

Sourceval uset_of_iset : CamomileLib.ISet.t -> t
Sourceval iset_of_uset : t -> CamomileLib.ISet.t
OCaml

Innovation. Community. Security.