.BI "size_t mbstowcs(wchar_t *" dest ", const char *" src ", size_t " n );
.fi
.SH DESCRIPTION
-If \fIdest\fP is not a NULL pointer,
+If
+.I dest
+is not a NULL pointer,
the
.BR mbstowcs ()
function converts the
-multibyte string \fIsrc\fP to a wide-character string starting at \fIdest\fP.
-At most \fIn\fP wide characters are written to \fIdest\fP.
+multibyte string
+.I src
+to a wide-character string starting at
+.IR dest .
+At most
+.I n
+wide characters are written to
+.IR dest .
The conversion starts
in the initial state.
The conversion can stop for three reasons:
.I (size_t)\ \-1
is returned.
.IP 2.
-\fIn\fP non-L\(aq\\0\(aq wide characters have been stored at \fIdest\fP.
+.I n
+non-L\(aq\\0\(aq wide characters have been stored at
+.IR dest .
In this
-case the number of wide characters written to \fIdest\fP is returned, but the
+case the number of wide characters written to
+.I dest
+is returned, but the
shift state at this point is lost.
.IP 3.
The multibyte string has been completely converted, including the
terminating null wide character (\(aq\\0\(aq).
In this case the number of wide characters written to
-\fIdest\fP, excluding the terminating null wide character, is returned.
+.IR dest ,
+excluding the terminating null wide character, is returned.
.PP
-The programmer must ensure that there is room for at least \fIn\fP wide
-characters at \fIdest\fP.
+The programmer must ensure that there is room for at least
+.I n
+wide
+characters at
+.IR dest .
.PP
-If \fIdest\fP is NULL, \fIn\fP is ignored, and the conversion proceeds as
+If
+.IR dest
+is NULL,
+.I n
+is ignored, and the conversion proceeds as
above, except that the converted wide characters are not written out to memory,
and that no length limit exists.
.PP
-In order to avoid the case 2 above, the programmer should make sure \fIn\fP is
-greater or equal to \fImbstowcs(NULL,src,0)+1\fP.
+In order to avoid the case 2 above, the programmer should make sure
+.I n
+is
+greater or equal to
+.IR "mbstowcs(NULL,src,0)+1" .
.SH RETURN VALUE
The
.BR mbstowcs ()