wctomb

Determines the number of bytes required to represent the multibyte character corresponding to the specified code (nonoperational in NetWare versions 3.11 and earlier)

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

Syntax

  #include <stdlib.h>  
   
  int wctomb  (  
     char      *s,   
     wchar_t    wchar);
  

Parameters

s
(OUT) Points to the array of multibyte characters.
wchar
(IN) Specifies the wide-character code.

Return

wctomb returns a value of 0 when s is a NULL pointer. Otherwise, it returns a value of 1.

Remarks

The wctomb function determines the number of bytes required to represent the multibyte character corresponding to the code contained in wchar. If s is not a NULL pointer, the multibyte character representation is stored in the array pointed to by s. At most, MB_CUR_MAX characters are stored.

wctomb is currently implemented for single-byte character coding only.

See Also

mblen, mbstowcs, mbtowc, wcstombs