mirror of
https://github.com/fluencelabs/musl
synced 2025-06-25 20:51:53 +00:00
these are mostly untested and adapted directly from corresponding byte string functions and similar.
9 lines
133 B
C
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;
|
|
}
|