.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" May be distributed under the GNU General Public License .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 18:58:18 1993 by Rik Faith (faith@cs.unc.edu) .TH MBTOWC 3 "March 29, 1993" "GNU" "Linux Programmer's Manual" .SH NAME mbtowc \- convert a multibyte character to a wide character. .SH SYNOPSIS .nf .B #include .sp .BI "int mbtowc(wchar_t *" pwc ", const char *" s ", size_t " n ); .fi .SH DESCRIPTION The \fBmbtowc()\fP function converts a multibyte character \fIs\fP, which is no longer than \fIn\fP bytes, into a wide character and, if \fIpwc\fP is not NULL, stores the wide character in \fIpwc\fP. .SH "RETURN VALUE" \fBmbtowc()\fP returns the number of bytes in the multibyte character or -1 if the multibyte character is not valid. .SH "CONFORMING TO" SVID 3, ISO 9899 .SH SEE ALSO .BR mblen "(3), " mbstowcs "(3), " wcstombs "(3), " wctomb (3)