summaryrefslogtreecommitdiff
path: root/src/wchar/wcsspn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wchar/wcsspn.c')
-rw-r--r--src/wchar/wcsspn.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/wchar/wcsspn.c b/src/wchar/wcsspn.c
new file mode 100644
index 00000000..50cd0e02
--- /dev/null
+++ b/src/wchar/wcsspn.c
@@ -0,0 +1,17 @@
+#include <wchar.h>
+
+size_t wcsspn(const wchar_t * s1, const wchar_t * s2)
+{
+ size_t i;
+ for (i = 0; s1[i] != L'\0'; i++) {
+ if (wcschr(s2, s1[i]) == NULL) {
+ return i;
+ }
+ }
+
+ return 0;
+}
+
+/*
+STDC(199409)
+*/