WCSXFRM(3)

NAME
wcsxfrm, wcsxfrm_l - transform a wide string under locale

SYNOPSIS
#include <wchar.h>
size_t
wcsxfrm(wchar_t *dst, const wchar_t *src, size_t n);
size_t
wcsxfrm_l(wchar_t *dst, const wchar_t *src, size_t n, locale_t locale);

DESCRIPTION
The idea of wcsxfrm() and wcsxfrm_l() is to “un-localize” a wide string: the functions transform src, storing the result in dst, such that wcscmp(3) on transformed wide strings returns what wcscoll(3) on the original untransformed wide strings would return.

On OpenBSD, both have the same effect as wcslcpy(3), and the global locale, the thread-specific locale, and the locale argument are ignored. On other operating systems, the behaviour may depend on the LC_CTYPE and LC_COLLATE locale categories set with setlocale(3), uselocale(3), or newlocale(3).

SEE ALSO
newlocale(3), setlocale(3), wcscmp(3), wcscoll(3), wcslcpy(3)

STANDARDS
The wcsxfrm() function conforms to isoC-99, and wcsxfrm_l() to p1003.1-2008.

HISTORY
The wcsxfrm() function has been available since OpenBSD 4.8, and wcsxfrm_l() since OpenBSD 6.2.