BTOWC(3) BSD Library Functions Manual BTOWC(3)
NAME
btowc, wctob, btowcl, wctobl -- convert between wide and single-byte
characters
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
##include <>
wintt
btowc(int c);
int
wctob(wintt c);
##include <>
wintt
btowcl(int c, localet loc);
int
wctobl(wintt c, localet loc);
DESCRIPTION
The btowc() function converts a single-byte character into a correspond-
ing wide character. If the character is EOF or not valid in the initial
shift state, btowc() returns WEOF.
The wctob() function converts a wide character into a corresponding sin-
gle-byte character. If the wide character is WEOF or not able to be rep-
resented as a single byte in the initial shift state, wctob() returns
WEOF.
While the btowc() and wctob() functions use the current locale, the
btowcl() and wctobl() functions may be passed locales directly. See
xlocale(3) for more information.
SEE ALSO
mbrtowc(3), multibyte(3), wcrtomb(3), xlocale(3)
STANDARDS
The btowc() and wctob() functions conform to IE Std 1003.1-2001
(``POSIX.1'').
HISTORY
The btowc() and wctob() functions first appeared in FreeBSD 5.0.
BSD August 3, 2002 BSD
|