wcsncpy(3C) wcsncpy(3C)
NAME
wcsncpy - copy a wide character string with bound
SYNOPSIS
#include <wchar.h>
wchar_t *wcsncpy(wchar_t *ws1,const wchar_t *ws2, size_t 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
wchar(5), wcscpy(3C)
Copyright 1994 Novell, Inc. Page 1