Fixing std.string

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Aug 20 00:15:45 PDT 2010


Ezneh wrote:
> There's also this in std.string which requires a fix :
> 
> http://d.puremagic.com/issues/show_bug.cgi?id=4673

Sure. On the face of it, I think isNumeric is a silly function because 
the effort expended on doing a good prediction is almost the same as 
doing the actual conversion - so why not just try it.

I guess

   return collectException(to!real(input)) is null;

should be a fine replacement for isNumeric.


Andrei


More information about the Digitalmars-d mailing list