[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.6 scheme.char - R7RS char library

Module: scheme.char

Exports bindings of R7RS (scheme char) library. From R7RS programs, those bindings are available by (import (scheme char)).

The following procedures are the same as Gauche’s builtin procedures; see section Characters.

 
char-alphabetic? char-ci<=? char-ci<?  char-ci=? char-ci>=? char-ci>?
char-downcase char-foldcase char-lower-case? char-numeric?
char-upcase char-upper-case?  char-whitespace?

The following procedures are the same as the ones provided in text.unicode module (see section Full string case conversion). They use full case folding by Unicode standard (e.g. taking into account of German eszett).

 
string-ci<=? string-ci<?  string-ci=? string-ci>=?  string-ci>?
string-downcase string-foldcase string-upcase
Function: digit-value c

[R7RS] If c is a character with Nd general category—that is, if it represents a decimal digit—this procedure returns the value the character represents. Otherwise it returns #f.

 
(digit-value #\3) ⇒ 3

(digit-value #\z) ⇒ #f

Note that Unicode defines about two dozen sets of digit characters.

 
(digit-value #\x11068) ⇒ 2

Gauche’s built-in procedure digit->integer has more general interface (see section Characters).

 
(digit-value c) ≡ (digit->integer c 10 #t)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated on July 19, 2014 using texi2html 1.82.