summaryrefslogtreecommitdiff
path: root/src/wctype/iswalnum.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wctype/iswalnum.c')
-rw-r--r--src/wctype/iswalnum.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/wctype/iswalnum.c b/src/wctype/iswalnum.c
new file mode 100644
index 00000000..dafc242e
--- /dev/null
+++ b/src/wctype/iswalnum.c
@@ -0,0 +1,28 @@
+#include <wctype.h>
+#include "limits.h"
+#include "nonstd/assert.h"
+#include "wchar.h"
+
+/** test whether a wide character is alphanumeric **/
+int iswalnum(wint_t wc)
+{
+ ASSERT_REPRESENTABLE(wc, WCHAR_MIN, WCHAR_MAX, "wchar_t", WEOF);
+
+ return iswalpha(wc) || iswdigit(wc);
+}
+
+/***
+The fn(iswalnum) function tests whether arg(wc) is a wide character in the class
+cclass(alpha) or cclass(digit) in the current locale.
+***/
+
+/* RETURN(NZ): arg(wc) is an alphanumeric character */
+/* RETURN(0): arg(wc) is not an alphanumeric character */
+
+/* UNSPECIFIED: - */
+/* IMPLEMENTATION: - */
+/* LOCALE: LC_CTYPE */
+
+/*
+STDC(199409)
+*/