digitalmars.D.bugs - [Issue 17180] New: to!string('\0') makes "\0" which breaks
- via Digitalmars-d-bugs (26/26) Feb 13 2017 https://issues.dlang.org/show_bug.cgi?id=17180
https://issues.dlang.org/show_bug.cgi?id=17180 Issue ID: 17180 Summary: to!string('\0') makes "\0" which breaks concatination Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: jiki red.email.ne.jp import std.conv; import std.stdio; void main() { char c = 0; string s = to!string(c); writeln(`"` ~ s ~ `"` ); stdout.flush(); // the last quate GONE assert(s.length == 0 || s[0] != '\0'); } * Empty string * Alternative character or message * Raising an error --
Feb 13 2017