1 #include <wchar.h>
2 
wcpncpy(wchar_t * restrict d,const wchar_t * restrict s,size_t n)3 wchar_t* wcpncpy(wchar_t* restrict d, const wchar_t* restrict s, size_t n) {
4     return wcsncpy(d, s, n) + wcsnlen(s, n);
5 }
6