eachline

eachline(stream)

Create an iterable object that will yield each line from a stream.

Examples

Iterate over a file's contents


julia> fp = open("numbers.txt");
julia> iter = eachline(fp);
julia> for i in iter
            print(i)
        end
1
2
3
4
5
julia> close(fp)

See Also

deserialize, eachline, eof, fd, flush, IOBuffer, ismarked, isopen, isreadonly, mark, nb_available, open, pipeline, position, read, read!, readavailable, readbytes, readbytes!, readline, redirect_stderr, redirect_stdin, reset, seek, seekend, seekstart, serialize, skip, skipchars, TextDisplay, unmark, write, writemime,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field
Details

Checking you are not a robot: