Next: , Previous: , Up: char-sets   [Index]


26.2 Constructors

Function: char-set char/range ...

Build and return a new char-set. The char/range arguments may be the empty list or a mixed list of characters and ranges.

Function: char-set-copy cs

Return a newly allocated char-set holding a copy of cs.

Function: char-set-add cs char/range
Function: char-set-adjoin cs char/range

Add values to an existing char-set. char/range can be a single character or a range. Return a new instance of char-set; the returned set may share some structure with the arguments.

Function: char-set-add! cs char/range
Function: char-set-adjoin! cs char/range

Add values to an existing char-set. char/range can be a single character or a range. Return cs itself; the returned set may share some structure with the arguments.

Function: char-set-delete cs char/range

Delete the char/range from the character set cs.

(char-set-delete (char-set #\a #\b) #\b)
⇒ (char-set #\a)
Constant: char-set-lower-bound
Constant: char-set-upper-bound
Constant: char-set-inner-upper-bound
Constant: char-set-inner-lower-bound

The character sets are defined by the Scheme standard to be in the ranges [0, #xD800) and (#xDFFF, #x10FFFF]. (vicare containers char-sets) exports these symbols, defined as follows:

(define char-set-lower-bound
  (integer->char 0))

(define char-set-inner-upper-bound
  (integer->char (- #xD800 1)))

(define char-set-inner-lower-bound
  (integer->char (+ 1 #xDFFF)))

(define char-set-upper-bound
  (integer->char #x10FFFF))