stdio.lines doesn't have popFront, but works with foreach
Andrew Klaassen via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Dec 11 12:21:02 PST 2014
On Thursday, 11 December 2014 at 20:17:50 UTC, bearophile wrote:
> Andrew Klaassen:
>
>> The docs for stdio.lines say that it's a struct. stdio.lines
>> works with foreach.
>
> If you want a range use "myfile".File.byLine or
> "myfile".File.byLineCopy.
>
> Bye,
> bearophile
I know that there are other ways that'll work. I was just
curious about what appears to be a surprise in the way that
foreach interacts with stdio.lines.
Andrew
More information about the Digitalmars-d-learn
mailing list