Next: Internal Representation of Characters, Previous: Comparison of Characters, Up: Characters

— procedure: **char-upcase**` char`

— procedure:**char-downcase**` char`

— procedure:

Returns the uppercase or lowercase equivalent of

charifcharis a letter; otherwise returnschar. These procedures return a characterchar2such that`(char-ci=?`

charchar2`)`

.

Note: Although character objects can represent all of Unicode, the model of alphabetic case used covers only ASCII letters, which means that case-insensitive comparisons and case conversions are incorrect for non-ASCII letters. This will eventually be fixed.

— procedure: **char->digit**` char `[`radix`]

If

charis a character representing a digit in the givenradix, returns the corresponding integer value. If you specifyradix(which must be an exact integer between 2 and 36 inclusive), the conversion is done in that base, otherwise it is done in base 10. Ifchardoesn't represent a digit in baseradix,`char->digit`

returns`#f`

.Note that this procedure is insensitive to the alphabetic case of

char.(char->digit #\8) => 8 (char->digit #\e 16) => 14 (char->digit #\e) => #f

— procedure: **digit->char**` digit `[`radix`]

Returns a character that represents

digitin the radix given byradix.Radixmust be an exact integer between 2 and 36 (inclusive), and defaults to 10.Digit, which must be an exact non-negative integer, should be less thanradix; ifdigitis greater than or equal toradix,`digit->char`

returns`#f`

.(digit->char 8) => #\8 (digit->char 14 16) => #\E