mirror of
https://github.com/red0124/ssp.git
synced 2025-01-23 04:55:20 +01:00
update README
This commit is contained in:
parent
17b170b8c4
commit
f71fced3c5
30
README.md
30
README.md
@ -1,11 +1,12 @@
|
||||
# Static split parser
|
||||
|
||||
A header only "csv" parser which is fast and versatile with modern c++ api. Requires compiler with c++17 support.
|
||||
A header only "csv" parser which is fast and versatile with modern C++ api. Requires compiler with C++17 support.
|
||||
|
||||
Conversion for numeric values taken from [oliver schönrock](https://gist.github.com/oschonrock/67fc870ba067ebf0f369897a9d52c2dd) .
|
||||
Conversion for numeric values taken from [Oliver Schönrock](https://gist.github.com/oschonrock/67fc870ba067ebf0f369897a9d52c2dd) .
|
||||
Function traits taken from [qt-creator](https://code.woboq.org/qt5/qt-creator/src/libs/utils/functiontraits.h.html) .
|
||||
|
||||
Example, lets say we have a csv file containing students in the
|
||||
# Example
|
||||
Lets say we have a csv file containing students in the
|
||||
following format <name,age,grade>:
|
||||
|
||||
```
|
||||
@ -22,7 +23,7 @@ Bill (Heath) Gates,65,3.3
|
||||
int main() {
|
||||
ss::parser p{"students.csv", ","};
|
||||
if (!p.valid()) {
|
||||
exit(exit_failure);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
while (!p.eof()) {
|
||||
@ -45,5 +46,26 @@ James Bailey 65 2.5
|
||||
Brian S. Wolfe 40 11.9
|
||||
Bill (Heath) Gates 65 3.3
|
||||
```
|
||||
# Features
|
||||
* Works on any type
|
||||
* No exceptions
|
||||
* Columns and rows can be ignored
|
||||
* Works with any type of delimiter
|
||||
* Can return whole objects composed of converted values
|
||||
* Descriptive error handling can be enabled
|
||||
* Restrictions can be added for each column
|
||||
* Works with `std::optional` and `std::variant`
|
||||
* Works with **CRLF** and **LF**
|
||||
* Conversions can be chained if invalid
|
||||
* Fast
|
||||
|
||||
# Instalation
|
||||
|
||||
```
|
||||
$ git clone https://github.com/red0124/ssp
|
||||
$ cd ssp
|
||||
$ sudo make install
|
||||
```
|
||||
# Usage
|
||||
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user