mbstowcs. McGraw-Hill The Complete Reference Fourth Edition
광고
광고
768
C + + : T h e C o m p l e t e R e f e r e n c e
The mblen( ) function returns the length (in bytes) of a multibyte character pointed to by str. Only the first size number of characters are examined. It returns –1 on error.
If str is null, then mblen( ) returns non-zero if multibyte characters have statedependent encodings. If they do not, zero is returned.
Related functions are mbtowc( ) and wctomb( ).
mbstowcs
#include <cstdlib> size_t mbstowcs(wchar_t * out, const char *in, size_t size);
The mbstowcs( ) function converts the multibyte string pointed to by in into a wide character string and puts that result in the array pointed to by out. Only size number of bytes will be stored in out.
The mbstowcs( ) function returns the number of multibyte characters that are converted. If an error occurs, the function returns –1.
Related functions are wcstombs( ), mbtowc( ).
mbtowc
#include <cstdlib> int mbtowc(wchar_t * out, const char *in, size_t size);
The mbtowc( ) function converts the multibyte character in the array pointed to by
in into its wide character equivalent and puts that result in the object pointed to by out.
Only size number of characters will be examined.
This function returns the number of bytes that are put into out. –1 is returned if an error occurs. If in is null, then mbtowc( ) returns non-zero if multibyte characters have state-dependent encodings. If they do not, zero is returned.
Related functions are mblen( ), wctomb( ).
qsort
#include <cstdlib> void qsort(void * buf, size_t num, size_t size, int (* compare) (const void *, const void *));
다운로드
광고