Module readwithcontext

Source
Expand description

File handling utilities that make life simpler for the common case.

Structs§

ReadWithContext
Automatically count lines and report them and the path in error messages

Functions§

easy_read_line
“Clean” read_line function: returns true if it did read a line, false on EOF. Does overwrite line, not append to it. Removes trailing ‘\n’ if present.
open_file
Easy buffered file opening with context on open errors. But see ReadWithContext instead for keeping context across subsequent calls, too.
trim