Summary: array(file.byLine()) is a problem
--- Comment #0 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2011-08-14
12:12:05 PDT ---
I can use readText, but if I want to use the byLine range with a call to
array() to save the lines of a text I end up getting garbage (I know why):
auto file = File("foo.txt", "r");
auto lineBuff = array(file.byLine());
I don't know if it can be fixed, I mean array() is not to blame (it only
exhausts a range), and byLine reuses a char buffer to stay efficient. But it
looks like something that could be thought about.
As a workaround I can do:
lineBuff = readText(r"file.txt").splitLines;
So it's not a big issue, but I ran into it and hence this report.
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------