add a "matches()" method to the Tokenizer and ValueTokenizer classes using utils::strmatch()

This commit is contained in:
Axel Kohlmeyer
2024-07-05 15:45:49 -04:00
parent eeaecb3ed3
commit 8fcde04097
3 changed files with 73 additions and 0 deletions

View File

@ -46,6 +46,7 @@ class Tokenizer {
void skip(int n = 1);
bool has_next() const;
bool contains(const std::string &str) const;
bool matches(const std::string &str) const;
std::string next();
size_t count();
@ -119,6 +120,7 @@ class ValueTokenizer {
bool has_next() const;
bool contains(const std::string &value) const;
bool matches(const std::string &str) const;
void skip(int ntokens = 1);
size_t count();