Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / string / wcpcpy.c
blob76c5311f101e9d9e757dc2de58299427a68b4081
1 /*
2 FUNCTION
3 <<wcpcpy>>---copy a wide-character string returning a pointer to its end
5 SYNOPSIS
6 #include <wchar.h>
7 wchar_t *wcpcpy(wchar_t *<[s1]>, const wchar_t *<[s2]>);
9 DESCRIPTION
10 The <<wcpcpy>> function copies the wide-character string pointed to by
11 <[s2]> (including the terminating null wide-character code) into the
12 array pointed to by <[s1]>. If copying takes place between objects that
13 overlap, the behaviour is undefined.
15 RETURNS
16 This function returns a pointer to the end of the destination string,
17 thus pointing to the trailing '\0'.
19 PORTABILITY
20 <<wcpcpy>> is a GNU extension.
22 No supporting OS subroutines are required.
25 #include <_ansi.h>
26 #include <wchar.h>
28 wchar_t *
29 wcpcpy (wchar_t *__restrict s1,
30 const wchar_t *__restrict s2)
32 while ((*s1++ = *s2++))
34 return --s1;