Module Unicode.CharSet

A set of Unicode code points, stored as sorted disjoint ranges.

type t
val mem : Uchar.t -> t -> bool

mem c set tests whether code point c belongs to set.

val ranges : t -> (int * int) array

ranges set returns the set as inclusive code point ranges (first, last), sorted by increasing value and disjoint. Ranges are plain ints rather than Uchar.t because some sets contain surrogate code points (e.g. General_Category Cs).