wcscpy(S-osr5)
wcscpy, wcsncpy --
copy a wide character string
Syntax
cc . . . -lc
#include <wchar.h>
wchar_t *wcscpy(wchar_t *ws1, const wchar_t *ws2);
wchar_t *wcsncpy(wchar_t *ws1, const wchar_t *ws2, size_t n);
Description
wcscpy(S-osr5)
puts a copy of the wide character string pointed to by ws2
into the array pointed to by ws1.
The terminating null wide-character code is also copied.
wcsncpy(S-osr5)
copies the first n wide-character
codes in the array pointed to by ws2
to the array pointed to by ws1.
The result is not null terminated if there is no
null wide character in these first n wide-character codes.
If ws2 points to a string of no more than n wide-character
codes, the string is copied to the array ws1
and the remaining elements in the
array are filled with null wide-character codes until a total
of n wide-character codes are written.
If copying takes place in overlapping memory blocks, the
behavior is undefined.
Return values
wcscpy( )
and
wcsncpy( )
return ws1; no error return value is reserved.
Diagnostics
The value of errno is undefined.
Warning
Character movement is performed differently in different
implementations. This is a cause for unexpected results
in moves between overlapping memory blocks.
See also
iswctype(S-osr5),
wctype(S-osr5)
Standards conformance
wcscpy( )
and
wcsncpy( )
are conformant with:
X/Open CAE Specification, System Interfaces and Headers,
Issue 4, 1992.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005