Files
musl/src/string/wcsnlen.c
Rich Felker e0614f7cd4 add all missing wchar functions except floating point parsers
these are mostly untested and adapted directly from corresponding byte
string functions and similar.
2012-03-01 23:24:45 -05:00

9 lines
133 B
C

#include <wchar.h>
size_t wcsnlen(const wchar_t *s, size_t n)
{
const wchar_t *z = wmemchr(s, 0, n);
if (z) n = z-s;
return n;
}