wcsncpy() — Copy Wide-Character Strings
Format
#include <wchar.h>
wchar_t *wcsncpy(wchar_t *string1, const wchar_t *string2, size_t count);
Language Level
XPG4
Threadsafe
Yes
Wide Character Function
See Wide Characters for more information.
Description
The wcsncpy()
function
copies up to count wide characters from string2 to string1.
If string2 is shorter than count characters, string1 is
padded out to count characters with wchar_t null
characters.
The wcsncpy()
function
operates on null-ended wide-character strings; string arguments to
this function should contain a wchar_t null character marking
the end of the string. Only string2 needs
to contain a null character.
Return Value
The wcsncpy()
returns
a pointer to string1.