towctrans


towctrans

Performs a locale-specific conversion on a wide character

 #include <wctype.h> wint_t towctrans ( wint_t wc , wctrans_t desc  ); 

The towctrans( ) function returns a wide character that corresponds to the wide character value of its first argument, wc, according to a locale-specific mapping described by the second argument, desc. Values of desc are obtained by calling the wctrans( ) function. The behavior of both wctrans( ) and towctrans( ) is dependent on the locale setting of the category LC_CTYPE, which must not change between the two function calls.

Example

 wint_t before = L'\0', after = L'\0'; wctrans_t mapping; mapping = wctrans("toupper"); while (( before = getwchar( ) ) != WEOF ) {   after = towctrans( before, mapping );   putwchar( after );   if ( after == L'Q' )     break; } 

See Also

wctrans( ), towlower( ), towupper( )



C(c) In a Nutshell
C in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596006977
EAN: 2147483647
Year: 2006
Pages: 473

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net