Process a text reader while its lines are available
fgets and ferror
std::getline
String.readLines
BufferedReader.readLine
contextlib.ExitStack
Source.getLines and Using.resource