Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / string / wmempcpy.c
blob98983f968a1b8b44d24deb4b9663510562eafe41
1 /*
2 FUNCTION
3 <<wmempcpy>>---copy wide characters in memory and return end pointer
5 SYNOPSIS
6 #define _GNU_SOURCE
7 #include <wchar.h>
8 wchar_t *wmempcpy(wchar_t *<[d]>,
9 const wchar_t *<[s]>, size_t <[n]>);
11 DESCRIPTION
12 The <<wmemcpy>> function copies <[n]> wide characters from the object
13 pointed to by <[s]> to the object pointed to be <[d]>. This function
14 is not affected by locale and all wchar_t values are treated
15 identically. The null wide character and wchar_t values not
16 corresponding to valid characters are not treated specially.
18 If <[n]> is zero, <[d]> and <[s]> must be a valid pointers, and the
19 function copies zero wide characters.
21 RETURNS
22 <<wmempcpy>> returns a pointer to the wide character following the
23 last wide character copied to the <[out]> region.
25 PORTABILITY
26 <<wmempcpy>> is a GNU extension.
28 No supporting OS subroutines are required.
31 #define _GNU_SOURCE
32 #include <_ansi.h>
33 #include <string.h>
34 #include <wchar.h>
36 wchar_t *
37 wmempcpy (wchar_t *__restrict d,
38 const wchar_t *__restrict s,
39 size_t n)
41 return (wchar_t *) mempcpy (d, s, n * sizeof (wchar_t));