Applications often need to manipulate sets of characters, such as the set of alphabetic characters or the set of whitespace characters. The alphabet abstraction provides an efficient implementation of sets of Unicode scalar values.
Returns a Unicode alphabet containing the Unicode characters passed as arguments.
Returns a Unicode alphabet containing the scalar values described by items. Items must satisfy
well-formed-scalar-values-list?
.
Returns a well-formed scalar-values list that describes the scalar values represented by alphabet.
Returns
#t
if object is a well-formed scalar-values list, otherwise returns#f
. A well-formed scalar-values list is a proper list, each element of which is either a unicode scalar value or a pair of unicode scalar values. A pair of scalar values represents a contiguous range of scalar values. The car of the pair is the lower limit, and the cdr is the upper limit. Both limits are inclusive, and the lower limit must be less than or equal to the upper limit.
Returns
#t
if char is a member of alphabet, otherwise returns#f
.
Character sets and alphabets can be converted to one another, provided that the alphabet contains only 8-bit scalar values. This is true because 8-bit scalar values in Unicode map directly to ISO-8859-1 characters, which is what character sets contain.
Returns a Unicode alphabet containing the scalar values that correspond to characters that are members of char-set.
Returns a character set containing the characters that correspond to 8-bit scalar values that are members of alphabet. (Scalar values outside the 8-bit range are ignored.)
Returns a Unicode alphabet containing the scalar values corresponding to the characters in string. Equivalent to
(char-set->alphabet (string->char-set string))
Returns a newly-allocated string containing the characters corresponding to the 8-bit scalar values in alphabet. (Scalar values outside the 8-bit range are ignored.)
Returns
#t
if alphabet contains only 8-bit scalar values, otherwise returns#f
.