Appending char[] to char[][] has unexpected results
Tim Keating
mrtact at gmail.com
Wed May 1 06:56:47 PDT 2013
On Wednesday, 1 May 2013 at 04:33:28 UTC, anonymous wrote:
> Just outBuf ~= buf.dup; works, too. Without .dup you're
> overwriting and appending the same chunk of memory again and
> again.
> From the documentation on File.readln
> (<http://dlang.org/phobos/std_stdio#readln>): "Note that
> reusing the buffer means that the previous contents of it has
> to be copied if needed."
> I'm a bit puzzled as for why it behaves differently with dchar.
Okay, that was obviously the bit I was missing. The dchar
situation IS baffling -- if that hadn't worked, I would have been
more certain I was simply doing something wrong.
More information about the Digitalmars-d
mailing list