digitalmars.D.bugs - [Issue 6640] New: More formatting consistency between string and range of char
- d-bugmail puremagic.com (43/43) Sep 10 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6640
- d-bugmail puremagic.com (11/11) Sep 10 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6640
http://d.puremagic.com/issues/show_bug.cgi?id=6640 Summary: More formatting consistency between string and range of char Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: k.hara.pg gmail.com --- Comment #0 from Kenji Hara <k.hara.pg gmail.com> 2011-09-10 06:28:32 PDT --- Sample code: ---- import std.stdio, std.range; void main() { struct Range { string value; const property bool empty(){ return !value.length; } const property dchar front(){ return value.front(); } void popFront(){ value.popFront(); } const property size_t length(){ return value.length; } } auto s = "string"; auto r = Range("string"); writef("[%s]", s); writefln("[%s]", r); writef("[%10s]", s); writefln("[%10s]", r); writef("[%-10s]", s); writefln("[%-10s]", r); writef("[%(%02x %)]", s); writefln("[%(%02x %)]", r); writef("[%(%s %)]", s); writefln("[%(%s %)]", r); } Outputs: ---- [string][string] // OK [ string][ string] // OK [string ][string ] // OK [73 74 72 69 6e 67][string] // expects [73 74 72 69 6e 67] [115 116 114 105 110 103][string] // expects [s t r i n g] -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 10 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6640 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2011-09-10 21:16:31 PDT --- https://github.com/D-Programming-Language/phobos/commit/740f3ec78a82aef22d90a523d87f3078e47cbcaf -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 10 2011