Expand description
Reads from file path, buffer, or descriptor and iterates over lines until EOF is reached
§Example
use iterate_text::file::lines::IterateFileLines;
let p = "tests/file/lines/file.txt";
let mut l = IterateFileLines::new(p);
assert_eq!(l.next(), Some("First line\n".to_string()));
assert_eq!(l.next(), Some("Second line\n".to_string()));
assert_eq!(l.next(), Some("Third line\n".to_string()));
assert_eq!(l.next(), None);
Structs§
- Iterate
File Lines - Wraps
BufReader<File>
and wraps.read_line()
fromBufReader
as an Iterator