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


2.9.3.2 General procedures

Function: char-set? obj

Return #t if obj is a character set, else return #f.

Function: char-set= cs ...

Return #t if all the arguments are character sets and all are equal, else return #f. When called with no arguments: return #t; when called with one argument: return #t.

Function: char-set<= cs ...

Return #t if every character set csi is a subset of character set csi+1, else return #f. When called with zero or one argument: return #t.

Function: char-set-hash cs
Function: char-set-hash cs bound

Compute a hash value for the character set cs. The optional argument bound is a non–negative exact integer specifying the range of the hash function; a positive value restricts the return value to the range [0, bound).

If bound is either zero or not given: the implementation may use an implementation–specific default value, chosen to be as large as is efficiently practical. For instance, the default range might be chosen for a given implementation to map all strings into the range of integers that can be represented with a single machine word.

Invariant:

(char-set= cs1 cs2) ⇒ (= (char-set-hash cs1 b)
                          (char-set-hash cs2 b))