delorie.com/djgpp/doc/libc/libc_560.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

mbtowc

Syntax

 
#include <stdlib.h>

int mbtowc(wchar_t *pwc, const char *s, size_t n);

Description

Convert the first multibyte sequence in s to a wide character. At most n characters are checked. If pwc is not NULL, the result is stored there. If s is null, the internal shift state is reset.

Return Value

The number of characters used by the multibyte sequence.

Portability

ANSI/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001

Example

 
string += mbtowc(&wc, string, strlen(string));


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004