[racket-dev] Character classification

From: Pierpaolo Bernardi (olopierpa at gmail.com)
Date: Tue Sep 4 12:09:18 EDT 2012

On Tue, Sep 4, 2012 at 5:03 PM, Sam Tobin-Hochstadt <samth at ccs.neu.edu> wrote:
> On Tue, Sep 4, 2012 at 10:57 AM, Pierpaolo Bernardi <olopierpa at gmail.com> wrote:
>>
>> What is annoying is that char-numeric? and string->number are not compatible.
>
> `char-numeric?` and `string->number` would not be "compatible" in the
> sense you're thinking of, even with the change you mention.
>
> For example:
>
> -> (string->number "+i")
> 0+1i
> -> (string->number "1#e4")
> 100000.0

They would be compatible in the other direction.  A string composed of
char-numeric? chars would be accepted by string->number.

In short, my-char-numeric? is a function that is useful, has been in
scheme since the stone age, and nowadays I have to write it myself,
and remember to not use char-numeric?, since it is never what I need
(and when I'll need the char-numeric? functionality I can get it with
char-general-category).

(Sorry about the previous duplicate messages. I don't know what's causing them)

P.

Posted on the dev mailing list.