diff --git a/src/utils.cpp b/src/utils.cpp index 6483997dc9..e293b6c67b 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -1815,7 +1815,7 @@ re_t re_compile(re_ctx_t context, const char *pattern) /* Private functions: */ static int matchdigit(char c) { - return ((c >= '0') && (c <= '9')); + return isdigit(c); } static int matchint(char c) @@ -1830,12 +1830,12 @@ static int matchfloat(char c) static int matchalpha(char c) { - return ((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')); + return isalpha(c); } static int matchwhitespace(char c) { - return ((c == ' ') || (c == '\t') || (c == '\n') || (c == '\r') || (c == '\f') || (c == '\v')); + return isspace(c); } static int matchalphanum(char c)