I don't find it correct or useful at all. I find a line iterator that does the same as gets correct.
If you know you need to recreate a file, why not simply use /"\n" and operate directly on that array? Then you know exactly what's going on. You could even insert new lines and remove old lines then.
In the more common case of reading or rewriting a small human readable database (config file, or lists or some sorts), adding the missing "\n" at the end shouldn't be dangerous at all, rather the opposite.
/ Mirar
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