Wide Character String C Tutorial

The functions wctrans() and towctrans() are also defined in

wctrans_t wctrans(const char *mapping);
wint_t towctrans(wint_t ch, wctrans_t mapping_ob);
tolower
toupper
The following sequence demonstrates wctrans() and towctrans():

#include 
#include 
int main(void){
  wctrans_t x;
  x = wctrans("tolower");
  wchar_t ch = towctrans(L'W', x);
  printf("%c", (char) ch);
}