We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 88fd0a6 + 5bc33b6 commit 98d0bf2Copy full SHA for 98d0bf2
re.c
@@ -31,6 +31,7 @@
31
32
#include "re.h"
33
#include <stdio.h>
34
+#include <ctype.h>
35
36
/* Definitions: */
37
@@ -289,15 +290,15 @@ void re_print(regex_t* pattern)
289
290
/* Private functions: */
291
static int matchdigit(char c)
292
{
- return ((c >= '0') && (c <= '9'));
293
+ return isdigit(c);
294
}
295
static int matchalpha(char c)
296
- return ((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z'));
297
+ return isalpha(c);
298
299
static int matchwhitespace(char c)
300
- return ((c == ' ') || (c == '\t') || (c == '\n') || (c == '\r') || (c == '\f') || (c == '\v'));
301
+ return isspace(c);
302
303
static int matchalphanum(char c)
304
0 commit comments