7.24.4.2.2 The wcsncpy function

Synopsis

1

#include <wchar.h>
wchar_t *wcsncpy(wchar_t * restrict s1,
     const wchar_t * restrict s2,
     size_t n);

Description

2

The wcsncpy function copies not more than n wide characters (those that follow a null wide character are not copied) from the array pointed to by s2 to the array pointed to by s1.[1]

3

If the array pointed to by s2 is a wide string that is shorter than n wide characters, null wide characters are appended to the copy in the array pointed to by s1, until n wide characters in all have been written.

Returns

4

The wcsncpy function returns the value of s1.

Footnotes