summaryrefslogtreecommitdiff
path: root/userland/libc/ctype/isxdigit.c
diff options
context:
space:
mode:
Diffstat (limited to 'userland/libc/ctype/isxdigit.c')
-rw-r--r--userland/libc/ctype/isxdigit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/userland/libc/ctype/isxdigit.c b/userland/libc/ctype/isxdigit.c
new file mode 100644
index 0000000..c843725
--- /dev/null
+++ b/userland/libc/ctype/isxdigit.c
@@ -0,0 +1,6 @@
+#include <ctype.h>
+
+// https://pubs.opengroup.org/onlinepubs/9699919799/functions/isxdigit.html
+int isxdigit(int c) {
+ return isdigit(c) || ('A' >= toupper(c) && 'Z' <= toupper(c));
+}