Go to main content

man pages section 3: Basic Library Functions

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

towctrans_l(3C)

Name

towctrans, towctrans_l - wide-character mapping

Synopsis

#include <wctype.h>

wint_t towctrans(wint_t wc, wctrans_t desc);
wint_t towctrans_l(wint_t wc, wctrans_t desc, locale_t locale);

Description

The towctrans() and towctrans_l functions map the wide character wc using the mapping described by desc. The setting of the LC_CTYPE category in the current locale or in the locale represented by locale, respectively, should be the same as during the call to wctrans() or wctrans_l() that returned the value desc.

If the value of desc is invalid (that is, not obtained by a call to wctrans() or desc is invalidated by a subsequent call to setlocale() that has affected category LC_CTYPE), the result is unspecified.

If the value of desc is invalid (that is, not obtained by a call to wctrans_l() with the same locale object locale) the result is unspecified.

The function call towctrans(wc, wctrans("tolower")) behaves the same as towlower(wc).

The function call towctrans_l(wc, wctrans_l("toupper", locale), locale) behaves the same as towupper_l(wc, locale).

Return Values

The towctrans() and towctrans_l() functions return the mapped value of wc, using the mapping described by desc; otherwise, it returns wc unchanged.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
CSI
Enabled
Interface Stability
Committed
MT-Level
MT-Safe
Standard

See Also

duplocale(3C), freelocale(3C), newlocale(3C), setlocale(3C), uselocale(3C), wctrans(3C), attributes(7), standards(7)