### 3.31 `towctrans`—extensible wide-character translation

Synopsis

         #include <wctype.h>
         wint_t towctrans(wint_t c, wctrans_t w);

Description
`towctrans` is a function which converts wide characters based on a specified translation type w. If the translation type is invalid or cannot be applied to the current character, no change to the character is made.

Returns
`towctrans` returns the translated equivalent of c when it is a valid for the given translation, otherwise, it returns the input character. When the translation type is invalid, `errno` is set `EINVAL`.

Portability
`towctrans` is C99.

No supporting OS subroutines are required.