Open generic function
Reads a stream up to the next newline.
read-line input-stream #key on-end-of-stream
=> string-or-eof newline?
<stream>.
<object>.
<string>, or an instance of <object> if the end of the stream is reached.
<boolean>.
io
streams
Returns a new string containing all the input in input-stream up to the next newline sequence.
The resulting string does not contain the newline sequence. The second value returned is #t if the read terminated with a newline or #f if the read terminated because it came to the end of the stream.
The type of the result string is chosen so that the string can contain characters of input-stream's element type. For example, if the element type is <byte-character>, the string will be a <byte-string>.
If input-stream is at its end immediately upon calling read-line (that is, the end of stream appears to be at the end of an empty line), then the end-of-stream behavior and the interpretation of on-end-of-stream is as for read-element.