aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QUtil.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-08-18 16:23:35 +0200
committerm-holger <m-holger@kubitscheck.org>2022-08-18 16:23:35 +0200
commit45a6100cbb014f5d4b89b7af1d03e8a846c474d9 (patch)
treef8cf57128df9cde6ccf3bed809bb0e49359f0edb /libqpdf/QUtil.cc
parentc08bb0ec0208683ecd0ad89c3d46d4d66b938fbd (diff)
downloadqpdf-45a6100cbb014f5d4b89b7af1d03e8a846c474d9.tar.zst
Inline QUtil functions used by QPDFTokenizer
Diffstat (limited to 'libqpdf/QUtil.cc')
-rw-r--r--libqpdf/QUtil.cc46
1 files changed, 0 insertions, 46 deletions
diff --git a/libqpdf/QUtil.cc b/libqpdf/QUtil.cc
index 4e58aaf7..d565ece0 100644
--- a/libqpdf/QUtil.cc
+++ b/libqpdf/QUtil.cc
@@ -1207,52 +1207,6 @@ QUtil::random()
return result;
}
-bool
-QUtil::is_hex_digit(char ch)
-{
- return (ch && (strchr("0123456789abcdefABCDEF", ch) != nullptr));
-}
-
-bool
-QUtil::is_space(char ch)
-{
- return (ch && (strchr(" \f\n\r\t\v", ch) != nullptr));
-}
-
-bool
-QUtil::is_digit(char ch)
-{
- return ((ch >= '0') && (ch <= '9'));
-}
-
-bool
-QUtil::is_number(char const* p)
-{
- // ^[\+\-]?(\.\d*|\d+(\.\d*)?)$
- if (!*p) {
- return false;
- }
- if ((*p == '-') || (*p == '+')) {
- ++p;
- }
- bool found_dot = false;
- bool found_digit = false;
- for (; *p; ++p) {
- if (*p == '.') {
- if (found_dot) {
- // only one dot
- return false;
- }
- found_dot = true;
- } else if (QUtil::is_digit(*p)) {
- found_digit = true;
- } else {
- return false;
- }
- }
- return found_digit;
-}
-
void
QUtil::read_file_into_memory(
char const* filename, std::shared_ptr<char>& file_buf, size_t& size)