| Extracted from Pike v7.8 release 866 at 2018-07-18.

[Top]
Stdio
Stdio.FILE

# Method Stdio.FILE()->line_iterator()

Method line_iterator

  `object line_iterator(int|void trim)`

Description

  Returns an iterator that will loop over the lines in this file. If trim is true, all `'\r'` characters will be removed from the input.

Note

  It's not supported to call this method more than once unless a call to seek is done in advance. Also note that it's not possible to intermingle calls to read , gets or other functions that read data with the line iterator, it will produce unexpected results since the internal buffer in the iterator will not contain sequential file-data in those cases.

See also

  _get_iterator()