source: trunk/libs/newlib/src/newlib/libc/string/wcsxfrm_l.c @ 620

Last change on this file since 620 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 1.3 KB
Line 
1/*
2FUNCTION
3        <<wcsxfrm_l>>---locale-specific wide-character string transformation
4       
5INDEX
6        wcsxfrm_l
7
8SYNOPSIS
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
14DESCRIPTION
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
30RETURNS
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
35PORTABILITY
36<<wcsxfrm_l>> is POSIX-1.2008.
37*/
38
39#include <_ansi.h>
40#include <wchar.h>
41
42size_t
43wcsxfrm_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}
Note: See TracBrowser for help on using the repository browser.