1.TH wchar.h 3 scc\-VERSION2.SH NAME3wchar.h - wide character operations4.SH SYNOPSIS5#include <wchar.h>67The wchar.h header declares the following functions:89.nf10int vswscanf(const wchar_t * restrict s, const wchar_t * restrict format, va_list arg);11int vwprintf(const wchar_t * restrict format, va_list arg);12int vwscanf(const wchar_t * restrict format, va_list arg);13int fwprintf(FILE * restrict stream, const wchar_t * restrict format, ...);14int fwscanf(FILE * restrict stream, const wchar_t * restrict format, ...);15int vfwprintf(FILE * restrict stream, const wchar_t * restrict format, va_list arg);16int vfwscanf(FILE * restrict stream, const wchar_t * restrict format, va_list arg);17int vswprintf(wchar_t * restrict s, size_t n, const wchar_t * restrict format, va_list arg);18wint_t fgetwc(FILE *stream);19wint_t fputwc(wchar_t c, FILE *stream);20wint_t getwc(FILE *stream);21wint_t putwc(wchar_t c, FILE *stream);22int fwide(FILE *stream, int mode);23wint_t ungetwc(wint_t c, FILE *stream);24wchar_t *fgetws(wchar_t * restrict s, int n, FILE * restrict stream);25int fputws(const wchar_t * restrict s, FILE * restrict stream);26int swprintf(wchar_t * restrict s, size_t n, const wchar_t * restrict format, ...);27int swscanf(const wchar_t * restrict s, const wchar_t * restrict format, ...);28int wprintf(const wchar_t * restrict format, ...);29int wscanf(const wchar_t * restrict format, ...);30wint_t getwchar(void);31wint_t putwchar(wchar_t c);32double wcstod(const wchar_t * restrict nptr, wchar_t ** restrict endptr);33float wcstof(const wchar_t * restrict nptr, wchar_t ** restrict endptr);34long double wcstold(const wchar_t * restrict nptr, wchar_t ** restrict endptr);35long int wcstol(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base);36long long int wcstoll(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base);37unsigned long int wcstoul(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base);38unsigned long long int wcstoull(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base);39wchar_t *wcscpy(wchar_t * restrict s1, const wchar_t * restrict s2);40wchar_t *wcsncpy(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n);41wchar_t *wmemcpy(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n);42wchar_t *wmemmove(wchar_t *s1, const wchar_t *s2, size_t n);43wchar_t *wcscat(wchar_t * restrict s1, const wchar_t * restrict s2);44wchar_t *wcsncat(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n);45int wcscmp(const wchar_t *s1, const wchar_t *s2);46int wcscoll(const wchar_t *s1, const wchar_t *s2);47int wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n);48size_t wcsxfrm(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n);49int wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n);50wchar_t *wcschr(const wchar_t *s, wchar_t c);51size_t wcscspn(const wchar_t *s1, const wchar_t *s2);52wchar_t *wcspbrk(const wchar_t *s1, const wchar_t *s2);53wchar_t *wcsrchr(const wchar_t *s, wchar_t c);54size_t wcsspn(const wchar_t *s1, const wchar_t *s2);55wchar_t *wcsstr(const wchar_t *s1, const wchar_t *s2);56wchar_t *wcstok(wchar_t * restrict s1, const wchar_t * restrict s2, wchar_t ** restrict ptr);57wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n);58size_t wcslen(const wchar_t *s);59wchar_t *wmemset(wchar_t *s, wchar_t c, size_t n);60size_t wcsftime(wchar_t * restrict s, size_t maxsize, const wchar_t * restrict format, const struct tm * restrict timeptr);61wint_t btowc(int c);62int wctob(wint_t c);63int mbsinit(const mbstate_t *ps);64size_t mbrlen(const char * restrict s, size_t n, mbstate_t * restrict ps);65size_t mbrtowc(wchar_t * restrict pwc, const char * restrict s, size_t n, mbstate_t * restrict ps);66size_t wcrtomb(char * restrict s, wchar_t wc, mbstate_t * restrict ps);67size_t mbsrtowcs(wchar_t * restrict dst, const char ** restrict src, size_t len, mbstate_t * restrict ps);68size_t wcsrtombs(char * restrict dst, const wchar_t ** restrict src, size_t len, mbstate_t * restrict ps);69int wcwidth(wchar_t wc);70.fi7172.SH DESCRIPTION73The wchar.h header defines the macros74.BR NULL ,75.BR WCHAR_MIN ,76and77.BR WEOF .78.B WEOF79expands to a constant expression of type80.B wint_t81with a value that does not correspond to any member of the extended character set.82It is used by several functions in this header to signal end-of-file83or to represent a wide character value outside the extended character set.84.PP85The header also defines the following types:86.BR size_t ;87.BR wchar_t ;88.BR mbstate_t ,89an object type (not an array) capable of holding90the state information needed to convert between multibyte and wide character sequences;91.BR wint_t ,92an integer type that is not narrowed by default argument promotions93and can represent all members of the extended character set94plus at least one additional value outside that set;95and96.BR "struct tm" ,97declared as an incomplete structure type.98.SH STANDARDS99ISO/IEC 9899:1999 Section 7.24.1100.SH SEE ALSO101.BR limits (3)102.BR stddef.h (3)103.BR vswscanf (3)104.BR vwprintf (3)105.BR vwscanf (3)106.BR fwprintf (3)107.BR fwscanf (3)108.BR vfwprintf (3)109.BR vfwscanf (3)110.BR vswprintf (3)111.BR fgetwc (3)112.BR fputwc (3)113.BR getwc (3)114.BR putwc (3)115.BR fwide (3)116.BR ungetwc (3)117.BR fgetws (3)118.BR fputws (3)119.BR swprintf (3)120.BR swscanf (3)121.BR wprintf (3)122.BR wscanf (3)123.BR getwchar (3)124.BR putwchar (3)125.BR wcstod (3)126.BR wcstof (3)127.BR double wcstold (3)128.BR wcstol (3)129.BR wcstoll (3)130.BR wcstoul (3)131.BR wcstoull (3)132.BR wcscpy (3)133.BR wcsncpy (3)134.BR wmemcpy (3)135.BR wmemmove (3)136.BR wcscat (3)137.BR wcsncat (3)138.BR wcscmp (3)139.BR wcscoll (3)140.BR wcsncmp (3)141.BR wcsxfrm (3)142.BR wmemcmp (3)143.BR wcschr (3)144.BR wcscspn (3)145.BR wcspbrk (3)146.BR wcsrchr (3)147.BR wcsspn (3)148.BR wcsstr (3)149.BR wcstok (3)150.BR wmemchr (3)151.BR wcslen (3)152.BR wmemset (3)153.BR wcsftime (3)154.BR btowc (3)155.BR wctob (3)156.BR mbsinit (3)157.BR mbrlen (3)158.BR mbrtowc (3)159.BR wcrtomb (3)160.BR mbsrtowcs (3)161.BR wcsrtombs (3)162.BR wcwidth (3)