aboutsummaryrefslogtreecommitdiff
path: root/system/lib/libc/musl/src/string/wmemchr.c
diff options
context:
space:
mode:
Diffstat (limited to 'system/lib/libc/musl/src/string/wmemchr.c')
-rw-r--r--system/lib/libc/musl/src/string/wmemchr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/system/lib/libc/musl/src/string/wmemchr.c b/system/lib/libc/musl/src/string/wmemchr.c
new file mode 100644
index 00000000..37d69629
--- /dev/null
+++ b/system/lib/libc/musl/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; n--, s++);
+ return n ? (wchar_t *)s : 0;
+}