Next: asciis predicates, Previous: asciis generic, Up: asciis [Index]
The following bindings are exported by the library (vicare
language-extensions ascii-chars)
. The identifiers whose name is
prefixed with ‘$’ are bound to unsafe operations: they do
not validate the arguments and applying them to invalid
arguments leads to undefined behaviour.
Given a fixnum representing a decimal digit in ASCII encoding: return the corresponding fixnum in the range [0, 9].
(ascii-dec->fixnum (char->integer #\5)) ⇒ 5
Given a fixnum in the range [0, 9]: return the corresponding fixnum representing the decimal digit in ASCII encoding.
(fixnum->ascii-dec 5) ⇒ (char->integer #\5)
Given a fixnum representing a hexadecimal digit in ASCII encoding: return the corresponding fixnum in the range [0, 15].
(ascii-hex->fixnum (char->integer #\5)) ⇒ 5 (ascii-hex->fixnum (char->integer #\A)) ⇒ 10
Given a fixnum in the range [0, 15]: return the corresponding fixnum representing the hexadecimal digit in ASCII encoding.
(fixnum->ascii-hex 5) ⇒ (char->integer #\5) (fixnum->ascii-hex 10) ⇒ (char->integer #\A)