An open API service indexing awesome lists of open source software.

https://github.com/coralkashri/simple_file_reader_cpp

A simple single-header file reader for a better experience while reading a text file in C++
https://github.com/coralkashri/simple_file_reader_cpp

Last synced: 2 months ago
JSON representation

A simple single-header file reader for a better experience while reading a text file in C++

Awesome Lists containing this project

README

          

# Simple File Reader C++

## Usage Example
```
#include "file_reader.hpp"

int main() {
std::ifstream file("test.txt");

for (std::string_view line : file_reader<'\n'>(file)) {
std::cout << line << "\n";
}

return 0;
}
```

The file reader accepts NTTP char to define the delimiter.

## Credits
word_delimited_by usage is taken from: https://www.fluentcpp.com/2017/04/21/how-to-split-a-string-in-c/