sigildocs

(scheme char)

(scheme char) - R7RS Character Library

Character comparison and conversion procedures.

See: R7RS Small §6.6

Exports

char=?procedure

Test if two characters are equal.

(char=? #\a #\a)  ; => #t
(char=? #\a #\A)  ; => #f

Re-exported from (sigil core)

char<?procedure

Test if the first character is less than the second.

(char<? #\a #\b)  ; => #t
(char<? #\b #\a)  ; => #f
(char<? #\A #\a)  ; => #t  (uppercase before lowercase in Unicode)

Re-exported from (sigil core)

char>?procedure

Test if the first character is greater than the second.

(char>? #\b #\a)  ; => #t
(char>? #\a #\b)  ; => #f

Re-exported from (sigil core)

char<=?procedure

Test if the first character is less than or equal to the second.

(char<=? #\a #\a)  ; => #t
(char<=? #\a #\b)  ; => #t
(char<=? #\b #\a)  ; => #f

Re-exported from (sigil core)

char>=?procedure

Test if the first character is greater than or equal to the second.

(char>=? #\a #\a)  ; => #t
(char>=? #\b #\a)  ; => #t
(char>=? #\a #\b)  ; => #f

Re-exported from (sigil core)

char->integerprocedure

Convert a character to its Unicode code point.

(char->integer #\a)    ; => 97
(char->integer #\A)    ; => 65
(char->integer #\λ)    ; => 955
(char->integer #\space) ; => 32

Re-exported from (sigil core)

integer->charprocedure

Convert a Unicode code point to its character.

(integer->char 97)   ; => #\a
(integer->char 65)   ; => #\A
(integer->char 955)  ; => #\λ

Re-exported from (sigil core)