http://d.puremagic.com/issues/show_bug.cgi?id=7692
Summary: std.conv.parse should do lookahead for "0x" in strings with radix 16 Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2012-03-11 19:50:29 PDT --- import std.conv; void main() { string s1 = "ff"; string s2 = "0xff"; assert(parse!uint(s1, 16) == 0xff); // ok assert(parse!uint(s2, 16) == 0xff); // fail, it's 0 } parse should pop the first two characters if the string starts with 0x. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------