Previous: , Up: Ctype   [Contents][Index]


3.33 wctrans, wctrans_l—get wide-character translation type

Synopsis

#include <wctype.h>
wctrans_t wctrans(const char *c);

#include <wctype.h>
wctrans_t wctrans_l(const char *c, locale_t locale);

Description
wctrans is a function which takes a string c and gives back the appropriate wctrans_t type value associated with the string, if one exists. The following values are guaranteed to be recognized: "tolower" and "toupper".

wctrans_l is like wctrans but performs the function based on the locale specified by the locale object locale. If locale is LC_GLOBAL_LOCALE or not a valid locale object, the behaviour is undefined.


Returns
wctrans, wctrans_l return 0 and sets errno to EINVAL if the given name is invalid. Otherwise, it returns a valid non-zero wctrans_t value.


Portability
wctrans is C99. wctrans_l is POSIX-1.2008.

No supporting OS subroutines are required.