btowc


btowc

Converts a byte character into a wide character

 #include <stdio.h> #include <wchar.h> wint_t btowc ( int c  ); 

The btowc( ) function returns the corresponding wide character for its byte character argument, if possible. A return value of WEOF indicates that the argument's value is EOF, or that the argument does not represent a valid byte character representation in the initial shift state of a multibyte stream.

Example

 /* Build a table of wide characters for the first 128 byte values */ wchar_t low_table[128]; for ( int i = 0; i < 128 ; i++ )   low_table[ i ] = (wchar_t)btowc( i );

See Also

wctob( ), mbtowc( ), wctomb( )



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