Node:SRFI-14 Creating Character Sets, Next:, Previous:SRFI-14 Iterating Over Character Sets, Up:SRFI-14



39.12.5 Creating Character Sets

New character sets are produced with these procedures.

char-set-copy cs Scheme Procedure
Return a newly allocated character set containing all characters in cs.

char-set char1 ... Scheme Procedure
Return a character set containing all given characters.

list->char-set char_list [base_cs] Scheme Procedure
list->char-set! char_list base_cs Scheme Procedure
Convert the character list list to a character set. If the character set base_cs is given, the character in this set are also included in the result.

list->char-set! is the side-effecting variant.

string->char-set s [base_cs] Scheme Procedure
string->char-set! s base_cs Scheme Procedure
Convert the string str to a character set. If the character set base_cs is given, the characters in this set are also included in the result.

string->char-set! is the side-effecting variant.

char-set-filter pred cs [base_cs] Scheme Procedure
char-set-filter! pred cs base_cs Scheme Procedure
Return a character set containing every character from cs so that it satisfies pred. If provided, the characters from base_cs are added to the result.

char-set-filter! is the side-effecting variant.

ucs-range->char-set lower upper [error? base_cs] Scheme Procedure
uce-range->char-set! lower upper error? base_cs Scheme Procedure
Return a character set containing all characters whose character codes lie in the half-open range [lower,upper).

If error is a true value, an error is signalled if the specified range contains characters which are not contained in the implemented character range. If error is #f, these characters are silently left out of the resulting character set.

The characters in base_cs are added to the result, if given.

ucs-range->char-set! is the side-effecting variant.

->char-set x Scheme Procedure
Coerce x into a character set. x may be a string, a character or a character set.