Parser class that accepts only characters given. More...
#include <Parser.h>
Public Member Functions | |
CharGroupParser (const char *accept_chars) | |
Constructor. More... | |
virtual | ~CharGroupParser () |
Destructor. More... | |
virtual bool | parse (const char *input) |
Parse input string. More... | |
![]() | |
virtual | ~AbstractParser () |
Destructor. More... | |
virtual const int8_t & | index () |
Get matched index of after parsing. More... | |
Additional Inherited Members | |
![]() | |
AbstractParser () | |
Constructor. More... | |
![]() | |
int8_t | m_index |
Parser class that accepts only characters given.
Refer to the usage below.
Utility::CharGroupParser::CharGroupParser | ( | const char * | accept_chars | ) |
Constructor.
[in] | accept_chars | Condition string. |
|
virtual |
Destructor.
|
virtual |
Parse input string.
In the implementation, parses the heading of the input. (i.e. Validate the input as ^[accept_chars].)
If you want ^[accept_chars]+$ to be validated, please edit the method yourself.
[in] | input | String you want to parse. |
Implements Utility::AbstractParser.