about summary refs log tree commit diff
path: root/src/string/wmemchr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string/wmemchr.c')
-rw-r--r--src/string/wmemchr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/string/wmemchr.c b/src/string/wmemchr.c
new file mode 100644
index 00000000..a3ee0e61
--- /dev/null
+++ b/src/string/wmemchr.c
@@ -0,0 +1,8 @@
+#include <string.h>
+#include <wchar.h>
+
+wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n)
+{
+	for (; n && *s != c; s++);
+	return n ? (wchar_t *)s : 0;
+}