December 2005
Beginner to intermediate
618 pages
20h 19m
English
btowc
Converts a byte character into a wide character
#include <stdio.h> #include <wchar.h> wint_tbtowc( intc);
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.
/* 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 );Read now
Unlock full access