.BI "size_t wcstombs(char *" dest ", const wchar_t *" src ", size_t " n );
.fi
.SH DESCRIPTION
-If \fIdest\fP is not a NULL pointer, the
+If
+.I dest
+is not a NULL pointer, the
.BR wcstombs ()
function converts
-the wide-character string \fIsrc\fP to a multibyte string starting at
-\fIdest\fP.
-At most \fIn\fP bytes are written to \fIdest\fP.
+the wide-character string
+.I src
+to a multibyte string starting at
+.IR dest .
+At most
+.I n
+bytes are written to
+.IR dest .
The conversion
starts in the initial state.
The conversion can stop for three reasons:
.PP
2. The length limit forces a stop.
In this case the number of bytes written to
-\fIdest\fP is returned, but the shift state at this point is lost.
+.I dest
+is returned, but the shift state at this point is lost.
.PP
3. The wide-character string has been completely converted, including the
terminating null wide character (L\(aq\\0\(aq).
In this case the conversion ends in the initial state.
-The number of bytes written to \fIdest\fP,
+The number of bytes written to
+.IR dest ,
excluding the terminating null byte (\(aq\\0\(aq), is returned.
.PP
-The programmer must ensure that there is room for at least \fIn\fP bytes
-at \fIdest\fP.
+The programmer must ensure that there is room for at least
+.I n
+bytes
+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 bytes 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 \fIwcstombs(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 "wcstombs(NULL,src,0)+1" .
.SH RETURN VALUE
The
.BR wcstombs ()