WCSNCPY(3) NEWLIB WCSNCPY(3)NAME
7.19 `wcsncpy'--copy part of a wide-character string
SYNOPSIS
#include <wchar.h>
wchar_t *wcsncpy(wchar_t *S1, const wchar_t *S2, size_t N);
DESCRIPTION
The `wcsncpy' function copies not more than N wide-character codes
(wide-character codes that follow a null wide-character code are not
copied) from the array pointed to by S2 to the array pointed to by S1.
If copying takes place between objects that overlap, the behaviour is
undefined. Note that if S1 contains more than N wide characters before
its terminating null, the result is not null-terminated.
If the array pointed to by S2 is a wide-character string that is
shorter than N wide-character codes, null wide-character codes are
appended to the copy in the array pointed to by S1, until N wide-char‐
acter codes in all are written.
RETURNS
The `wcsncpy' function returns S1; no return value is reserved to indi‐
cate an error.
PORTABILITY
ISO/IEC 9899; POSIX.1.
No supporting OS subroutines are required.
SEE ALSOwcsncpy is part of the library. The full documentation for is main‐
tained as a Texinfo manual. If info and are properly installed at your
site, the command
info
will give you access to the complete manual.
NEWLIB April 2010 WCSNCPY(3)