package camomile

  1. Overview
  2. No Docs
A Unicode library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

camomile-1.0.2.tbz
sha256=f0a419b0affc36500f83b086ffaa36c545560cee5d57e84b729e8f851b3d1632
sha512=7586422e68779476206027c6ebbe19b677fbe459153221f7c952c7fae374c5c8232249cb76fdb1f482069707aa1580be827cd39693906142988268b7f0e7f6d0

doc/camomile.library/CamomileLibrary/module-type-Type/USet/index.html

Module Type.USetSource

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

Sourcetype t = USet.t
Sourceval empty : t
Sourceval is_empty : t -> bool
Sourceval mem : UChar.t -> t -> bool
Sourceval add : UChar.t -> t -> t
Sourceval add_range : UChar.t -> 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 : UChar.t -> t
Sourceval remove : UChar.t -> t -> t
Sourceval remove_range : UChar.t -> 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 : 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 : UChar.t -> t -> t

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

Sourceval until : 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 : UChar.t -> t -> t

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

Sourceval iter : (UChar.t -> unit) -> t -> unit
Sourceval iter_range : (UChar.t -> 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 : (UChar.t -> 'a -> 'a) -> t -> 'a -> 'a
Sourceval fold_range : (UChar.t -> 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 : (UChar.t -> bool) -> t -> bool
Sourceval exists : (UChar.t -> bool) -> t -> bool
Sourceval filter : (UChar.t -> bool) -> t -> t
Sourceval partition : (UChar.t -> bool) -> t -> t * t
Sourceval cardinal : t -> int
Sourceval elements : t -> UChar.t list
Sourceval ranges : t -> (UChar.t * 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 -> UChar.t
Sourceval max_elt : t -> UChar.t
Sourceval choose : t -> 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 : (int * int) CamomileLibrary__.AvlTree.tree -> t
Sourceval iset_of_uset : t -> (int * int) CamomileLibrary__.AvlTree.tree
OCaml

Innovation. Community. Security.