http://d.puremagic.com/issues/show_bug.cgi?id=9558
Summary: 0b and 0x prefixes for std.string.isNumeric
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 2013-02-21 09:52:31 PST ---
This is almost an enhancement request.
I think std.string.isNumeric should see the 0b and 0x prefixes as parts of a
number literal:
import std.stdio: writeln;
import std.string: isNumeric;
void main() {
isNumeric("0x10").writeln();
isNumeric("0b1010101").writeln();
}
With dmd 2.062 prints:
false
false
Expected:
true
true
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------