wint_t towctrans(wint_t c, wctrans_t desc);
Convert using transformation
Applies a the transformation specified by desc to the wide character c.
A specific locale can accept multiple transformations for characters. At least the following transformations are recognized by all locales:
The setting of the LC_CTYPE locale category at the time of calling the function shall be the same as when wctrans was called to obtain desc.
- Wide character to be transformed, casted to a wint_t value, or WEOF.
wint_t is an integral type.
- A value returned by a call to wctrans (with the same LC_CTYPE locale category selected as in this call).
wctrans_t is the scalar type used as return type for wctrans.
The character transformation of c, if such value exists, or c (unchanged) otherwise.
The value is returned as a wint_t value that can be implicitly casted to wchar_t.
/* towctrans example */
int main ()
wchar_t str = L"Test String.\n";
wctype_t check = wctype("lower");
wctrans_t trans = wctrans("toupper");
c = str[i];
if (iswctype(c,check)) c = towctrans(c,trans);
- Return character transformation (function)
- Convert lowercase wide character to uppercase (function)
- Convert uppercase wide character to lowercase (function)
- Check if wide character has property (function)