wcstombs

Converts a sequence of wide-character codes from an array into a sequence of multibyte characters (nonoperational in NetWare versions 3.11 and earlier)

Local Servers:nonblocking
Remote Servers:N/A
Classification:ANSI
Service:Character Manipulation

Syntax

  #include <stdlib.h>  
   
  size_t wcstombs  (  
     char            *s,   
     const wchar_t   *pwcs,   
     size_t           n);
  

Parameters

s
(OUT) Points to the array of multibyte characters.
pwcs
(IN) Points to the array of wide-character codes to be converted.
n
(IN) Specifies the number of bytes of the array pointed to by s to be modified.

Return Values

This function returns the actual number of bytes that have been copied from the array pointed to by pwcs to the array pointed to by s. The returned value is always less than n.

Remarks

The wcstombs function converts a sequence of wide-character codes from the array pointed to by pwcs into a sequence of multibyte characters and stores them in the array pointed to by s. The wcstombs function stops if a multibyte character would exceed the limit of n total bytes, or if the NULL character is stored. At most , n bytes of the array pointed to by s are modified.

See Also

mblen, mbstowcs, mbtowc, wctomb