source: trunk/libs/newlib/src/newlib/libc/string/wcsxfrm.c @ 444

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

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

File size: 1.2 KB
Line 
1/*
2FUNCTION
3        <<wcsxfrm>>---locale-specific wide-character string transformation
4       
5INDEX
6        wcsxfrm
7
8SYNOPSIS
9        #include <wchar.h>
10        int wcsxfrm(wchar_t *__restrict <[stra]>,
11                    const wchar_t *__restrict <[strb]>, size_t <[n]>);
12
13DESCRIPTION
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.
20
21        If <[n]> is 0, <[stra]> may be a NULL pointer.
22
23        (NOT Cygwin:) The current implementation of <<wcsxfrm>> simply uses
24        <<wcslcpy>> and does not support any language-specific transformations.
25
26RETURNS
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.
30
31PORTABILITY
32<<wcsxfrm>> is ISO/IEC 9899/AMD1:1995 (ISO C).
33*/
34
35#include <_ansi.h>
36#include <wchar.h>
37
38size_t
39wcsxfrm (wchar_t *__restrict a,
40        const wchar_t *__restrict b,
41        size_t n)
42
43{
44  return wcslcpy (a, b, n);
45}
Note: See TracBrowser for help on using the repository browser.