[Issue 4466] std.conv: parse!(T, S)(S, uint radix) the opposite of to to!(T, S)(S, uint radix)
http://d.puremagic.com/issues/show_bug.cgi?id=4466 yebblies changed: What|Removed |Added Status|NEW |RESOLVED CC||yebbl...@gmail.com Resolution||FIXED --- Comment #3 from yebblies 2011-07-01 22:55:23 EST --- Closing as the function is now in phobos and works. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4466] std.conv: parse!(T, S)(S, uint radix) the opposite of to to!(T, S)(S, uint radix)
http://d.puremagic.com/issues/show_bug.cgi?id=4466 Lionello Lunesu changed: What|Removed |Added AssignedTo|nob...@puremagic.com|and...@metalanguage.com --- Comment #2 from Lionello Lunesu 2010-07-15 07:50:08 PDT --- I've added the following function to std.conv: Target parse(Target, Source)(ref Source s, uint radix) Check the unittest: unittest { foreach (i; 2..36) { assert(parse!int("0",i) == 0); assert(parse!int("1",i) == 1); assert(parse!byte("10",i) == i); } assert(parse!int("0011001101101",2) == 0b0011001101101); assert(parse!int("765",8) == 0765); assert(parse!int("fCDe",16) == 0xfcde); } The unittest passes, were it not for bug 4309. (The "ref" in "ref Source" apparently changes the pointer to the string literal.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4466] std.conv: parse!(T, S)(S, uint radix) the opposite of to to!(T, S)(S, uint radix)
http://d.puremagic.com/issues/show_bug.cgi?id=4466 --- Comment #1 from Lionello Lunesu 2010-07-15 07:46:57 PDT --- Created an attachment (id=691) patch to std.conv, adds parse!(T,S)(S, uint radix) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---