wcsncpy(3C) DG/UX R4.11MU05 wcsncpy(3C)
NAME
wcsncpy - copy a wide character string with bound
SYNOPSIS
#include <wchar.h>
wchart *wcsncpy(wchart *ws1,const wchart *ws2, sizet n);
DESCRIPTION
wcsncpy copies exactly n wide characters, truncating the wide string
ws2 or adding null wide characters to ws1, if necessary. Wide
characters that follow a null wide character are not copied. The
result will not be null-terminated if the length of ws2 is n or more.
If the array ws2 points to is a wide character string that is shorter
than n wide characters, the copy in the array pointed to by ws1 is
padded with null wide characters until a total of n wide characters
is written. This function does not check for an overflow condition
of the array pointed to by ws1.
Return Values
wcsncpy returns ws1.
USAGE
Overlapping moves may cause unexpected results because the movement
of wide characters is implementation-dependent. If there is no null
wide character in the first n wide characters of the array pointed to
by ws2, the result will not be null-terminated.
REFERENCES
wcscpy(3C)
Licensed material--property of copyright holder(s)