Definition | #include <wchar.h> wchar_t *wcsncpy(wchar_t *ws1, const wchar_t *ws2, size_t n);
If the wide character string ws2 contains less than n characters, only the length of ws2 (wcslen + 1) is copied, and ws1 is then padded to the length of n with null wide character codes. If the wide character string ws2 contains n or more characters (excluding the null wide character code), the wide character string ws1 is not automatically terminated with a null wide character code. If the wide character string ws1 contains more than n characters and the last character copied from ws2 is not a null wide character code, any data which may still remain in ws1 will be retained.
|
Return val. | Pointer to the resulting wide character string ws1. |
Notes | This version of the C runtime system only supports one-byte characters as wide character codes.
Since The behavior is undefined if memory areas overlap. |
See also | strncpy, wcscpy |