Read a single line of text, including a trailing newline character (if one is reached before the end of the input), from the given stream (defaults to STDIN),


julia> foo = readline();
julia> print(foo);

Reading from a file

julia> fp = open("helloworld.txt");    
julia> readline(fp)     # read first line
julia> readline(fp)     # read second line

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

Checking you are not a robot: