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

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

mbstowcs

Syntax

 
#include <stdlib.h>

size_t mbstowcs(wchar_t *wcs, const char *s, size_t n);

Description

Converts a multibyte string to a wide character string. The result will be no more than n wide characters.

Return Value

The number of wide characters stored.

Portability

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

Example

 
int wlen = mbtowcs(wbuf, string, sizeof(wbuf)/sizeof(wchar_t));


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004