Previous: Character-Set Algebra, Up: Character Sets


5.5.4.6 Standard Character Sets

In order to make the use of the character set data type and procedures useful, several predefined character set variables exist.

Currently, the contents of these character sets are recomputed upon a successful setlocale call (see Locales) in order to reflect the characters available in the current locale's codeset. For instance, char-set:letter contains 52 characters under an ASCII locale (e.g., the default C locale) and 117 characters under an ISO-8859-1 (“Latin-1”) locale.

— Scheme Variable: char-set:lower-case
— C Variable: scm_char_set_lower_case

All lower-case characters.

— Scheme Variable: char-set:upper-case
— C Variable: scm_char_set_upper_case

All upper-case characters.

— Scheme Variable: char-set:title-case
— C Variable: scm_char_set_title_case

This is empty, because ASCII has no titlecase characters.

— Scheme Variable: char-set:letter
— C Variable: scm_char_set_letter

All letters, e.g. the union of char-set:lower-case and char-set:upper-case.

— Scheme Variable: char-set:digit
— C Variable: scm_char_set_digit

All digits.

— Scheme Variable: char-set:letter+digit
— C Variable: scm_char_set_letter_and_digit

The union of char-set:letter and char-set:digit.

— Scheme Variable: char-set:graphic
— C Variable: scm_char_set_graphic

All characters which would put ink on the paper.

— Scheme Variable: char-set:printing
— C Variable: scm_char_set_printing

The union of char-set:graphic and char-set:whitespace.

— Scheme Variable: char-set:whitespace
— C Variable: scm_char_set_whitespace

All whitespace characters.

— Scheme Variable: char-set:blank
— C Variable: scm_char_set_blank

All horizontal whitespace characters, that is #\space and #\tab.

— Scheme Variable: char-set:iso-control
— C Variable: scm_char_set_iso_control

The ISO control characters with the codes 0–31 and 127.

— Scheme Variable: char-set:punctuation
— C Variable: scm_char_set_punctuation

The characters !"#%&'()*,-./:;?@[\\]_{}

— Scheme Variable: char-set:symbol
— C Variable: scm_char_set_symbol

The characters $+<=>^`|~.

— Scheme Variable: char-set:hex-digit
— C Variable: scm_char_set_hex_digit

The hexadecimal digits 0123456789abcdefABCDEF.

— Scheme Variable: char-set:ascii
— C Variable: scm_char_set_ascii

All ASCII characters.

— Scheme Variable: char-set:empty
— C Variable: scm_char_set_empty

The empty character set.

— Scheme Variable: char-set:full
— C Variable: scm_char_set_full

This character set contains all possible characters.