2007-12-20 01:33:12 +08:00
|
|
|
/*
|
|
|
|
FUNCTION
|
|
|
|
<<wcpcpy>>---copy a wide-character string returning a pointer to its end
|
|
|
|
|
2017-11-30 16:20:06 +08:00
|
|
|
SYNOPSIS
|
2007-12-20 01:33:12 +08:00
|
|
|
#include <wchar.h>
|
2015-06-23 22:53:51 +08:00
|
|
|
wchar_t *wcpcpy(wchar_t *<[s1]>, const wchar_t *<[s2]>);
|
2007-12-20 01:33:12 +08:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
The <<wcpcpy>> function copies the wide-character string pointed to by
|
|
|
|
<[s2]> (including the terminating null wide-character code) into the
|
|
|
|
array pointed to by <[s1]>. If copying takes place between objects that
|
|
|
|
overlap, the behaviour is undefined.
|
|
|
|
|
|
|
|
RETURNS
|
|
|
|
This function returns a pointer to the end of the destination string,
|
|
|
|
thus pointing to the trailing '\0'.
|
|
|
|
|
|
|
|
PORTABILITY
|
|
|
|
<<wcpcpy>> is a GNU extension.
|
|
|
|
|
|
|
|
No supporting OS subroutines are required.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <_ansi.h>
|
|
|
|
#include <wchar.h>
|
|
|
|
|
|
|
|
wchar_t *
|
|
|
|
_DEFUN (wcpcpy, (s1, s2),
|
2013-11-27 01:21:01 +08:00
|
|
|
wchar_t *__restrict s1 _AND
|
|
|
|
_CONST wchar_t *__restrict s2)
|
2007-12-20 01:33:12 +08:00
|
|
|
{
|
|
|
|
while ((*s1++ = *s2++))
|
|
|
|
;
|
|
|
|
return --s1;
|
|
|
|
}
|