Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / string / wcsxfrm.c
blob72b3c5bd0b922251663c41c8a4e83b120958dad1
1 /*
2 FUNCTION
3 <<wcsxfrm>>---locale-specific wide-character string transformation
5 INDEX
6 wcsxfrm
8 SYNOPSIS
9 #include <wchar.h>
10 int wcsxfrm(wchar_t *__restrict <[stra]>,
11 const wchar_t *__restrict <[strb]>, size_t <[n]>);
13 DESCRIPTION
14 <<wcsxfrm>> transforms the wide-character string pointed to by
15 <[strb]> to the wide-character string pointed to by <[stra]>,
16 Comparing two transformed wide strings with <<wcscmp>> should return
17 the same result as comparing the original strings with <<wcscoll>>.
18 No more than <[n]> wide characters are transformed, including the
19 trailing null character.
21 If <[n]> is 0, <[stra]> may be a NULL pointer.
23 (NOT Cygwin:) The current implementation of <<wcsxfrm>> simply uses
24 <<wcslcpy>> and does not support any language-specific transformations.
26 RETURNS
27 <<wcsxfrm>> returns the length of the transformed wide character
28 string. if the return value is greater or equal to <[n]>, the
29 content of <[stra]> is undefined.
31 PORTABILITY
32 <<wcsxfrm>> is ISO/IEC 9899/AMD1:1995 (ISO C).
35 #include <_ansi.h>
36 #include <wchar.h>
38 size_t
39 wcsxfrm (wchar_t *__restrict a,
40 const wchar_t *__restrict b,
41 size_t n)
44 return wcslcpy (a, b, n);