OpenBSD manual page server

Manual Page Search Parameters

WCSXFRM(3) Library Functions Manual WCSXFRM(3)

wcsxfrm, wcsxfrm_ltransform a wide string under locale

#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);

The idea of () and () 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).

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

The wcsxfrm() function conforms to ISO/IEC 9899:1999 (“ISO C99”), and wcsxfrm_l() to IEEE Std 1003.1-2008 (“POSIX.1”).

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

January 18, 2019 OpenBSD-6.7