]> pd.if.org Git - pdclib/blobdiff - functions/wctype/iswupper.c
PDCLIB-3 implement isw* functions
[pdclib] / functions / wctype / iswupper.c
diff --git a/functions/wctype/iswupper.c b/functions/wctype/iswupper.c
new file mode 100644 (file)
index 0000000..c011772
--- /dev/null
@@ -0,0 +1,31 @@
+/* iswupper( wint_t )\r
+\r
+   This file is part of the Public Domain C Library (PDCLib).\r
+   Permission is granted to use, modify, and / or redistribute at will.\r
+*/\r
+\r
+#include <wctype.h>\r
+#ifndef REGTEST\r
+#include <_PDCLIB_locale.h>\r
+\r
+int iswupper( wint_t wc )\r
+{\r
+    return iswctype( wc, _PDCLIB_CTYPE_UPPER );\r
+}\r
+\r
+#endif\r
+\r
+#ifdef TEST\r
+#include <_PDCLIB_test.h>\r
+\r
+int main( void )\r
+{\r
+    TESTCASE(!iswupper(L'a'));\r
+    TESTCASE(!iswupper(L'e'));\r
+    TESTCASE(!iswupper(L'z'));\r
+    TESTCASE(iswupper(L'A'));\r
+    TESTCASE(iswupper(L'E'));\r
+    TESTCASE(iswupper(L'Z'));\r
+    return TEST_RESULTS;\r
+}\r
+#endif\r