From 34a6f8938f0e6d55eeb9f37c0ef23e02fec88932 Mon Sep 17 00:00:00 2001 From: m-holger Date: Thu, 29 Sep 2022 14:33:11 +0100 Subject: Add methods QPDFTokenizer::Token::isWord --- include/qpdf/QPDFTokenizer.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/qpdf/QPDFTokenizer.hh b/include/qpdf/QPDFTokenizer.hh index 3f5e5206..0fd34fb9 100644 --- a/include/qpdf/QPDFTokenizer.hh +++ b/include/qpdf/QPDFTokenizer.hh @@ -112,6 +112,16 @@ class QPDFTokenizer { return this->type == tt_integer; } + bool + isWord() const + { + return this->type == tt_word; + } + bool + isWord(std::string const& value) const + { + return this->type == tt_word && this->value == value; + } private: token_type_e type; -- cgit v1.2.3-54-g00ecf