On Sunday, 13 December 2020 at 11:51:19 UTC, kdevel wrote:
~~~char2.d void main () { import std.stdio; import std.conv; char [2] win = [0, 'X']; auto ne = new Exception ("A " ~ win.to!string ~ " B"); try throw ne; catch (Exception e) writeln ("exception caught: e.msg = <", e.msg, ">"); throw ne; } ~~~[...]
Is it really a bug ? \0 truncates the string, as mentionned on this page :
https://en.wikipedia.org/wiki/Null-terminated_string