[Previous] [Contents] [Next]

btowc()

Convert a single-byte character to a wide character

Synopsis:

#include <wchar.h>

wint_t btowc( int c );

Library:

libc

Description:

The btowc() function determines whether c is a valid one-byte character in the initial shift state.

This function is the single byte version of mbtowc().

Returns:

WEOF
Failure; the variable c has the value EOF or (unsigned char) c isn't a valid one-byte character in the initial conversion state.
Character
Success; the wide-character representation of the character.

Classification:

ANSI

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

"Character manipulation functions" and "Wide-character functions" in the summary of functions chapter.


[Previous] [Contents] [Next]