slightly cleaner strlen, also seems to compile to better code
[musl] / src / string / wmemchr.c
1 #include <string.h>
2 #include <wchar.h>
3
4 wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n)
5 {
6         for (; n && *s != c; n--, s++);
7         return n ? (wchar_t *)s : 0;
8 }