Line based text parser.
This library provides a simple way to parse line based data.
Easy to use.
Support for all types of delimiters and line endings.
Support for arbitrary boolean value notation.
Support for categorical data.
Support for integers in any base.
Tiny overhead compared to dedicated solutions.
Please see ReadTheDocs for the latest documentation.
TextParser object is initialised with a delimiter, which can consist of
more than one symbol.
#include <textparser.h> TextParser parser(", "); // Delimiter is a comma followed by a space.
If all fields are of the same type, we can use an array.
int a; parser.parseLine("1, 2, 3, 4, 5", a);
If the fields have different types, we can use multiple variables.
char a; int b; double c; parser.parseLine("one, 2, 3.4", a, b, c);