[Issue 7282] std.string.format throws at runtime where writef works fine
http://d.puremagic.com/issues/show_bug.cgi?id=7282 Andrej Mitrovic changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WORKSFORME --- Comment #3 from Andrej Mitrovic 2013-01-21 17:51:28 PST --- Works in 2.061. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7282] std.string.format throws at runtime where writef works fine
http://d.puremagic.com/issues/show_bug.cgi?id=7282 --- Comment #2 from Andrej Mitrovic 2012-01-12 12:23:57 PST --- Also that function is broken (I mean its result), fixed one is: auto pretty(string src) { Appender!(dchar[]) res; size_t i = 1; while (!src.empty) { res.put(src.back); src.popBack; if (!src.empty && (i++ % 3 == 0)) res.put("_"); } return retro(res.data); } I was hoping there was something like this in Phobos but it didn't catch my eye. Anywho.. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7282] std.string.format throws at runtime where writef works fine
http://d.puremagic.com/issues/show_bug.cgi?id=7282 --- Comment #1 from Andrej Mitrovic 2012-01-12 12:12:49 PST --- Btw a workaround: string str = to!string(pretty("123456")); auto str1 = format("%s", str); So to!string works as well, it's just format() that bails. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---