2007-07-05 00:18:34 +08:00
|
|
|
/*
|
|
|
|
FUNCTION
|
|
|
|
<<wcsxfrm>>---locale-specific wide-character string transformation
|
|
|
|
|
|
|
|
INDEX
|
|
|
|
wcsxfrm
|
|
|
|
|
2017-11-30 16:20:06 +08:00
|
|
|
SYNOPSIS
|
2007-07-05 00:18:34 +08:00
|
|
|
#include <wchar.h>
|
2013-11-27 01:21:01 +08:00
|
|
|
int wcsxfrm(wchar_t *__restrict <[stra]>,
|
|
|
|
const wchar_t *__restrict <[strb]>, size_t <[n]>);
|
2007-07-05 00:18:34 +08:00
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
<<wcsxfrm>> transforms the wide-character string pointed to by
|
|
|
|
<[strb]> to the wide-character string pointed to by <[stra]>,
|
|
|
|
Comparing two transformed wide strings with <<wcscmp>> should return
|
|
|
|
the same result as comparing the original strings with <<wcscoll>>.
|
|
|
|
No more than <[n]> wide characters are transformed, including the
|
|
|
|
trailing null character.
|
|
|
|
|
|
|
|
If <[n]> is 0, <[stra]> may be a NULL pointer.
|
|
|
|
|
2016-07-25 02:00:34 +08:00
|
|
|
(NOT Cygwin:) The current implementation of <<wcsxfrm>> simply uses
|
|
|
|
<<wcslcpy>> and does not support any language-specific transformations.
|
2007-07-05 00:18:34 +08:00
|
|
|
|
|
|
|
RETURNS
|
|
|
|
<<wcsxfrm>> returns the length of the transformed wide character
|
|
|
|
string. if the return value is greater or equal to <[n]>, the
|
|
|
|
content of <[stra]> is undefined.
|
|
|
|
|
|
|
|
PORTABILITY
|
|
|
|
<<wcsxfrm>> is ISO/IEC 9899/AMD1:1995 (ISO C).
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <_ansi.h>
|
|
|
|
#include <wchar.h>
|
|
|
|
|
|
|
|
size_t
|
2017-12-04 11:43:30 +08:00
|
|
|
wcsxfrm (wchar_t *__restrict a,
|
2017-12-04 10:25:16 +08:00
|
|
|
const wchar_t *__restrict b,
|
2007-07-05 00:18:34 +08:00
|
|
|
size_t n)
|
|
|
|
|
|
|
|
{
|
|
|
|
return wcslcpy (a, b, n);
|
|
|
|
}
|