That's not good enough. If I wanted to suck up a complete file into memory, I wouldn't bother with line_iterator in the first place.
What I need to do is something like
int first = 1; foreach(Stdio.stdin->line_iterator();; string line) { if (first) first = 0; else write("\n");
write(line); }
which I find way too complex for such a simple task.
/ Niels Möller ()
Previous text:
2002-12-31 14:26: Subject: stdin->line_iterator
If you want the samt file back you do
array out; foreach(Stdio.stdin->line_iterator();; string line) out += process_line(line); Stdio.write_file("processed.cfg", out*"\n");
Yes, we could have lots of iterators. The one I propose should be the main line iterator though since it is the correct one.
/ Peter Bortas