There is a readln function, and this is not forum but just web frontend around mailing list. http://forum.dlang.org/help#about
Dne 2. 2. 2017 7:20 PM napsal uživatel "John Doe via Digitalmars-d-learn" < digitalmars-d-learn@puremagic.com>: > Let's say you're trying to parse a file format like: > > Name > http://example.com > 123234 > > Foo Bar > http://dlang.org > 888888 > > with blocks separated by varying amount of blank lines. > > ----- > import std.stdio; > > void main(string[] args){ > auto range = File("text.txt").byLine(); > > foreach( line; range ){ > if (line != ""){ > writeln(line); > // char[] url = range.??? > // char[] num = range.??? > } > } > } > ----- > 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. > > btw: What is this? A forum for a programming language that doesn't support > code blocks? >