If you don't call `front` on a `ByLine` range then an extra line is reported. This change ensures the extra line is consumed when only calling `empty` without `front`.
https://d.puremagic.com/issues/show_bug.cgi?id=11830
This fixes some warnings as identified by the compiler,
as well as some broken cross-reference links caused by
DDoc auto-formatting of the current symbol.
Calling take could wrongly pop an extra line from the range.
Solved by making ByLine use reference-counting.
Note: Just changing ByLine not to eagerly read the next line was not
sufficient to handle all cases properly (plus that makes empty() less
efficient).
Note: ByLine was documented until recently.
Add an overload of byLine without a default argument for terminator.
Before, byLine!string tried to instantiate "string terminator = '\n'",
which is invalid.
Note: This removes the default arguments from ByLine.this, but the
constructor was never documented anyway (unlike the range primitives).
Make byChunk, lockingTextWriter return opaque types (but keep those
types public for backward compatibility).
Add byChunk range example.
Also document that ByLine's primitives can throw StdioException.
Move byLine examples from ByLine to byLine.
Fix LinesReader typo.
Explain that lines will not persist when using a mutable type for Char.
Document parameters.
Purge phantom fp parameter.
Add missing parameters and throws info.
Fix File.readln(buf) example to use char[] buf for reuse, not string.
Fix swapped readln() and File.readln() examples.
Separate readln() and readln(buf) docs because the behaviour and
return types are different.
Fixes an issue where `readln!S` did not forward the type "S" in `stdin.readln()` => `stdin.readln!S()` (that was my mistake, sorry)
Fixes an issue where `File.readln!S` assumed S was an "immutable string type". This should work:
char[] buf;
buf = myFile.readln!(char[])();
While buf is not reused after each call, there should be nothing preventing the user for mutating if he so (explicitly) wishes.
Added/improved unittests a wee little bit.