<div dir="auto">There is a readln function, and this is not forum but just web frontend around mailing list. <a href="http://forum.dlang.org/help#about">http://forum.dlang.org/help#about</a></div><div class="gmail_extra"><br><div class="gmail_quote">Dne 2. 2. 2017 7:20 PM napsal uživatel "John Doe via Digitalmars-d-learn" <<a href="mailto:digitalmars-d-learn@puremagic.com">digitalmars-d-learn@puremagic.com</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Let's say you're trying to parse a file format like:<br>
<br>
Name<br>
<a href="http://example.com" rel="noreferrer" target="_blank">http://example.com</a><br>
123234<br>
<br>
Foo Bar<br>
<a href="http://dlang.org" rel="noreferrer" target="_blank">http://dlang.org</a><br>
888888<br>
<br>
with blocks separated by varying amount of blank lines.<br>
<br>
-----<br>
import std.stdio;<br>
<br>
void main(string[] args){<br>
    auto range = File("text.txt").byLine();<br>
<br>
    foreach( line; range ){<br>
        if (line != ""){<br>
            writeln(line);<br>
            // char[] url = range.???<br>
            // char[] num = range.???<br>
        }<br>
    }<br>
}<br>
-----<br>
How can you read the next line while iterating over a file line by line, so that the next iteration uses the line after next? If this isn't possible byLine is a design flaw and D should instead provide a regular readLine function.<br>
<br>
btw: What is this? A forum for a programming language that doesn't support code blocks?<br>
</blockquote></div></div>