[Issue 4673] Bug in std.string (isNumeric)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 25 12:31:15 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4673



--- Comment #9 from kennytm at gmail.com 2010-08-25 12:31:06 PDT ---
(In reply to comment #8)
> Created an attachment (id=740) [details]
> Improvements of the proposed patch
> 
> Well, I checked the lexical page about D2 and it seems that something like
> 1_2_3_4_5_._5_4e-5_2_ is a numeric, so I decided to make some changes to the
> regex to allow this kind of numerics.
> 
> But I wonder, should we consider hex things like 0xFFF as numerics or should we
> have to make another function like "isHexadecimal" ?

The current isNumeric function also considered "123,456,789" numeric (with the
bAllowSep parameter set to true). May be there should be another function or
switch that handles "human-readable numeric string" and "number literals in D
syntax" differently.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list