Multibyte/Wide-Character Conversion Functions : Wide Character Functions « Wide Character String « C Tutorial

Home
C Tutorial
1.Language
2.Data Type
3.String
4.printf scanf
5.Operator
6.Statement
7.Array
8.Function
9.Structure
10.Pointer
11.Memory
12.Preprocessor
13.File
14.Data Structure
15.Search Sort
16.Wide Character String
17.assert.h
18.ctype.h
19.math.h
20.setjmp.h
21.signal.h
22.stdio.h
23.stdlib.h
24.string.h
25.time.h
26.wctype.h
C / ANSI-C
C++
C++ Tutorial
Visual C++ .NET
C Tutorial » Wide Character String » Wide Character Functions 
16.1.6.Multibyte/Wide-Character Conversion Functions

They use the header .

Wide-Character/Multibyte Conversion Functions

FunctionDescription
win_t btowc(int ch)Converts ch into its wide-character equivalent and returns the result. Returns WEOF on error or if ch is not a one-byte, multibyte character.
size_t mbrlen(const char *str, size_t num,mbstate_t *state)Restartable version of mblen() as described by state. Returns a positive value that indicates the length of the next multibyte character. Zero is returned if the next character is null. A negative value is returned if an error occurs.
size_t mbrtowc(wchar_t *out,const char *in,size_t num,mbstate_t *state)Restartable version of mbtowc() as described by state. Returns a positive value that indicates the length of the next multibyte character. Zero is returned if the next character is null. A value of -1 is returned if an error occurs and the macro EILSEQ is assigned to errno. If the conversion is incomplete, -2 is returned.
int mbsinit(const mbstate_t *state)Returns true if state represents an initial conversion state.
size_t mbsrtowcs(wchar_t *out,const char **in,size_t num, mbstate_t state)Restartable version of mbstowcs() as described by state. Also, mbsrtowcs() differs from mbstowcs() in that in is an indirect pointer to the source array. If an error occurs, the macro EILSEQ is assigned to errno.
size_t wcrtomb(char *out, wchar_t ch, mbstate_t *state)Restartable version of wctomb() as described by state. If an error occurs, the macro EILSEQ is assigned to errno.
size_t wcsrtombs(char *out, const wchar_t **in, size_t num, mbstate_t *state)Restartable version of wcstombs() as described by state. Also, wcsrtombs() differs from wcstombs() in that in is an indirect pointer to the source array. If an error occurs, the macro EILSEQ is assigned to errno.
int wctob(wint_t ch)Converts ch into its one-byte, multibyte equivalent. It returns EOF on failure.


(C: The Complete Reference, Fourth Edition by Herbert Schildt McGraw-Hill/Osborne 2000 ISBN-10: 0072121246, ISBN-13: 978-0072121247)

16.1.Wide Character Functions
16.1.1.Wide-Character Functions
16.1.2.Wide-Character I/O Functions
16.1.3.Wide-Character String Functions
16.1.4.Wide-Character String Conversion Functions
16.1.5.Wide-Character Array Functions
16.1.6.Multibyte/Wide-Character Conversion Functions
16.1.7.An open-ended means of classifying characters.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.