[racket-dev] Character classification

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Tue Sep 4 09:11:14 EDT 2012

Since the R5RS version of char-numeric? (according to the documentation)
tests for the ten digits, you can use:

(require (only-in r5rs char-numeric?))

/Jens Axel

2012/9/4 Pierpaolo Bernardi <olopierpa at gmail.com>:
> The non-cooperation between char-numeric? and string->number is very annoying.
> I had to resort to:
> (define (my-char-numeric? c)
>   (char<=? #\0 c #\9))
> Maybe I am missing a function similar to my-char-numeric? somewhere in
> the Racket docs?
> FWIW, my humble opinion is that char-numeric? should be defined as the
> my- version above. The Unicode category, if that's what one wants, can
> be accessed with char-general-category.
> Cheers
> P.
> _________________________
>   Racket Developers list:
>   http://lists.racket-lang.org/dev

Jens Axel Søgaard

Posted on the dev mailing list.