diff options
Diffstat (limited to 'src/util/Tokenizer.cxx')
-rw-r--r-- | src/util/Tokenizer.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/util/Tokenizer.cxx b/src/util/Tokenizer.cxx index 726da0dd6..1c8af23fd 100644 --- a/src/util/Tokenizer.cxx +++ b/src/util/Tokenizer.cxx @@ -19,6 +19,7 @@ #include "config.h" #include "Tokenizer.hxx" +#include "CharUtil.hxx" #include "StringUtil.hxx" #include "Error.hxx" #include "Domain.hxx" @@ -33,13 +34,13 @@ static constexpr Domain tokenizer_domain("tokenizer"); static inline bool valid_word_first_char(char ch) { - return g_ascii_isalpha(ch); + return IsAlphaASCII(ch); } static inline bool valid_word_char(char ch) { - return g_ascii_isalnum(ch) || ch == '_'; + return IsAlphaNumericASCII(ch) || ch == '_'; } char * @@ -61,7 +62,7 @@ Tokenizer::NextWord(Error &error) whitespace or end-of-string */ while (*++input != 0) { - if (g_ascii_isspace(*input)) { + if (IsWhitespaceOrNull(*input)) { /* a whitespace: the word ends here */ *input = 0; /* skip all following spaces, too */ @@ -106,7 +107,7 @@ Tokenizer::NextUnquoted(Error &error) whitespace or end-of-string */ while (*++input != 0) { - if (g_ascii_isspace(*input)) { + if (IsWhitespaceOrNull(*input)) { /* a whitespace: the word ends here */ *input = 0; /* skip all following spaces, too */ @@ -170,7 +171,7 @@ Tokenizer::NextString(Error &error) line) */ ++input; - if (*input != 0 && !g_ascii_isspace(*input)) { + if (!IsWhitespaceOrNull(*input)) { error.Set(tokenizer_domain, "Space expected after closing '\"'"); return nullptr; |