http://d.puremagic.com/issues/show_bug.cgi?id=4959
Summary: std.conv.parse error "no digits seen" on string
starting with zero
Product: D
Version: D2
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Lars T. Kyllingstad <[email protected]> 2010-09-30
06:24:18 PDT ---
Test case:
auto s = "0 ";
auto f = parse!double(s); // std.conv.ConvError: no digits seen
The problem is that when the string starts with '0', parse() skips that char to
check if the next one is 'x' (to determine whether it's a hex number). When it
is not a hex number, like in the example above, the zero is simply discarded.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------