WCTOB(3C) | Standard C Library Functions | WCTOB(3C) |
wctob, wctob_l - wide-character to single-byte conversion
#include <stdio.h> #include <wchar.h> int wctob(wint_t c);
#include <stdio.h> #include <wchar.h> #include <xlocale.h> int wctob_l(wint_t c, locale_t loc);
The wctob() function determines whether c corresponds to a member of the extended character set whose character representation is a single byte when in the initial shift state.
The behavior of wctob() is affected by the LC_CTYPE category of the current locale. See environ(7)
The function wctob_l() behaves identically to wctob(), except instead of operating in the current locale, it operates in the locale specified by loc.
These functions return EOF if c does not correspond to a character with length one in the initial shift state. Otherwise, they return the single-byte representation of that character.
No errors are defined.
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | See below |
MT-Level | MT-Safe |
The wctob() function is Standard. The wctob_l() function is Uncommitted.
btowc(3C), newlocale(3C), setlocale(3C), uselocale(3C), attributes(7), environ(7), standards(7)
June 25, 2014 | OmniOS |