1 | /* |
---|
2 | FUNCTION |
---|
3 | <<wcsxfrm_l>>---locale-specific wide-character string transformation |
---|
4 | |
---|
5 | INDEX |
---|
6 | wcsxfrm_l |
---|
7 | |
---|
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]>); |
---|
13 | |
---|
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. |
---|
21 | |
---|
22 | If <[n]> is 0, <[stra]> may be a NULL pointer. |
---|
23 | |
---|
24 | If <[locale]> is LC_GLOBAL_LOCALE or not a valid locale object, the |
---|
25 | behaviour is undefined. |
---|
26 | |
---|
27 | (NOT Cygwin:) The current implementation of <<wcsxfrm_l>> simply uses |
---|
28 | <<wcslcpy>> and does not support any language-specific transformations. |
---|
29 | |
---|
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. |
---|
34 | |
---|
35 | PORTABILITY |
---|
36 | <<wcsxfrm_l>> is POSIX-1.2008. |
---|
37 | */ |
---|
38 | |
---|
39 | #include <_ansi.h> |
---|
40 | #include <wchar.h> |
---|
41 | |
---|
42 | size_t |
---|
43 | wcsxfrm_l (wchar_t *__restrict a, const wchar_t *__restrict b, size_t n, |
---|
44 | struct __locale_t *locale) |
---|
45 | { |
---|
46 | return wcslcpy (a, b, n); |
---|
47 | } |
---|