Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libc / string / wcsxfrm_l.c
blobbfc4ae56b8fa7a980a87886c6b2750020c14a840
1 /*
2 FUNCTION
3 <<wcsxfrm_l>>---locale-specific wide-character string transformation
5 INDEX
6 wcsxfrm_l
8 SYNOPSIS
9 #include <wchar.h>
10 int wcsxfrm_l(wchar_t *__restrict <[stra]>,
11 const wchar_t *__restrict <[strb]>, size_t <[n]>,
12 locale_t <[locale]>);
14 DESCRIPTION
15 <<wcsxfrm_l>> transforms the wide-character string pointed to by
16 <[strb]> to the wide-character string pointed to by <[stra]>,
17 Comparing two transformed wide strings with <<wcscmp>> should return
18 the same result as comparing the original strings with <<wcscoll>>.
19 No more than <[n]> wide characters are transformed, including the
20 trailing null character.
22 If <[n]> is 0, <[stra]> may be a NULL pointer.
24 If <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the
25 behaviour is undefined.
27 (NOT Cygwin:) The current implementation of <<wcsxfrm_l>> simply uses
28 <<wcslcpy>> and does not support any language-specific transformations.
30 RETURNS
31 <<wcsxfrm_l>> returns the length of the transformed wide character
32 string. if the return value is greater or equal to <[n]>, the
33 content of <[stra]> is undefined.
35 PORTABILITY
36 <<wcsxfrm_l>> is POSIX-1.2008.
39 #include <_ansi.h>
40 #include <wchar.h>
42 size_t
43 wcsxfrm_l (wchar_t *__restrict a, const wchar_t *__restrict b, size_t n,
44 struct __locale_t *locale)
46 return wcslcpy (a, b, n);