@c ----------------------------------------------------------------------
@node wcstombs, locale
@findex wcstombs
@subheading Syntax

@example
#include <stdlib.h>

size_t wcstombs(char *s, const wchar_t *wcs, size_t n);
@end example

@subheading Description

Converts a wide character string to a multibyte string.  At most
@var{n} characters are stored.

@subheading Return Value

The number of characters stored.

@subheading Portability

@portability ansi, posix

@subheading Example

@example
int len = wcstombs(buf, wstring, sizeof(buf));
@end example

