On Saturday, 19 January 2019 at 20:38:00 UTC, faissaloo wrote:
On Saturday, 19 January 2019 at 20:07:34 UTC, Rubn wrote:
On Saturday, 19 January 2019 at 17:49:31 UTC, faissaloo wrote:
[...]
If you look at the implementation, "lines" is a struct.
On Saturday, 19 January 2019 at 20:07:34 UTC, Rubn wrote:
On Saturday, 19 January 2019 at 17:49:31 UTC, faissaloo wrote:
[...]
If you look at the implementation, "lines" is a struct.
https://github.com/dlang/phobos/blob/v2.084.0/std/stdio.d#L4330
[...]
Ah that makes some sense, thanks for
On Saturday, 19 January 2019 at 17:49:31 UTC, faissaloo wrote:
This seems to work fine
file = File("test.txt", "r");
with (file)
{
scope(exit) close();
foreach (string line; file.lines())
{
line_array ~= line;
}
}
however:
file =
This seems to work fine
file = File("test.txt", "r");
with (file)
{
scope(exit) close();
foreach (string line; file.lines())
{
line_array ~= line;
}
}
however:
file = File("test.txt", "r");
with (file)
{
scope(exit) close();