From e0614f7cd418afedd06c9bcd5abb965608bc52f8 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 1 Mar 2012 23:24:45 -0500 Subject: add all missing wchar functions except floating point parsers these are mostly untested and adapted directly from corresponding byte string functions and similar. --- src/string/wcsnlen.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/string/wcsnlen.c (limited to 'src/string/wcsnlen.c') diff --git a/src/string/wcsnlen.c b/src/string/wcsnlen.c new file mode 100644 index 00000000..a7763373 --- /dev/null +++ b/src/string/wcsnlen.c @@ -0,0 +1,8 @@ +#include + +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; +} -- cgit v1.2.1