[Issue 9558] New: 0b and 0x prefixes for std.string.isNumeric
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 21 09:52:32 PST 2013
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: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 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: -------
More information about the Digitalmars-d-bugs
mailing list