mbtowc

Converts a single multibyte character into the wide-character code that corresponds to that multibyte character (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 mbtowc  (  
     wchar_t      *pwc,   
     const char   *s,   
     size_t        n);
  

Parameters

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

Return Values

This function returns a value of 0 for any of the following conditions:

Remarks

The mbtowc function converts a single multibyte character pointed to by s into the wide-character code that corresponds to that multibyte character.

The code for the NULL character is zero. If the multibyte character is valid and pwc is not a NULL pointer, the code is stored in the object pointed to by pwc. At most, n bytes of the array pointed to by s are examined.

This function is currently implemented for single-byte character coding only.

See Also

mblen, mbstowcs, wcstombs, wctomb