Add count method to ValueTokenizer
This commit is contained in:
@ -131,3 +131,7 @@ double ValueTokenizer::next_double() {
|
|||||||
void ValueTokenizer::skip(int ntokens) {
|
void ValueTokenizer::skip(int ntokens) {
|
||||||
current = std::next(current, ntokens);
|
current = std::next(current, ntokens);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const size_t ValueTokenizer::count() const {
|
||||||
|
return tokens.count();
|
||||||
|
}
|
||||||
|
|||||||
@ -82,6 +82,8 @@ public:
|
|||||||
|
|
||||||
bool has_next() const;
|
bool has_next() const;
|
||||||
void skip(int ntokens);
|
void skip(int ntokens);
|
||||||
|
|
||||||
|
const size_t count() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user