wchar.h.3 (5929B)
1 .TH wchar.h 3 2 .SH NAME 3 wchar.h - wide character operations 4 .SH SYNOPSIS 5 #include <wchar.h> 6 7 The wchar.h header declares the following functions: 8 9 .nf 10 int vswscanf(const wchar_t * restrict s, const wchar_t * restrict format, va_list arg); 11 int vwprintf(const wchar_t * restrict format, va_list arg); 12 int vwscanf(const wchar_t * restrict format, va_list arg); 13 int fwprintf(FILE * restrict stream, const wchar_t * restrict format, ...); 14 int fwscanf(FILE * restrict stream, const wchar_t * restrict format, ...); 15 int vfwprintf(FILE * restrict stream, const wchar_t * restrict format, va_list arg); 16 int vfwscanf(FILE * restrict stream, const wchar_t * restrict format, va_list arg); 17 int vswprintf(wchar_t * restrict s, size_t n, const wchar_t * restrict format, va_list arg); 18 wint_t fgetwc(FILE *stream); 19 wint_t fputwc(wchar_t c, FILE *stream); 20 wint_t getwc(FILE *stream); 21 wint_t putwc(wchar_t c, FILE *stream); 22 int fwide(FILE *stream, int mode); 23 wint_t ungetwc(wint_t c, FILE *stream); 24 wchar_t *fgetws(wchar_t * restrict s, int n, FILE * restrict stream); 25 int fputws(const wchar_t * restrict s, FILE * restrict stream); 26 int swprintf(wchar_t * restrict s, size_t n, const wchar_t * restrict format, ...); 27 int swscanf(const wchar_t * restrict s, const wchar_t * restrict format, ...); 28 int wprintf(const wchar_t * restrict format, ...); 29 int wscanf(const wchar_t * restrict format, ...); 30 wint_t getwchar(void); 31 wint_t putwchar(wchar_t c); 32 double wcstod(const wchar_t * restrict nptr, wchar_t ** restrict endptr); 33 float wcstof(const wchar_t * restrict nptr, wchar_t ** restrict endptr); 34 long double wcstold(const wchar_t * restrict nptr, wchar_t ** restrict endptr); 35 long int wcstol(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); 36 long long int wcstoll(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); 37 unsigned long int wcstoul(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); 38 unsigned long long int wcstoull(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); 39 wchar_t *wcscpy(wchar_t * restrict s1, const wchar_t * restrict s2); 40 wchar_t *wcsncpy(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n); 41 wchar_t *wmemcpy(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n); 42 wchar_t *wmemmove(wchar_t *s1, const wchar_t *s2, size_t n); 43 wchar_t *wcscat(wchar_t * restrict s1, const wchar_t * restrict s2); 44 wchar_t *wcsncat(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n); 45 int wcscmp(const wchar_t *s1, const wchar_t *s2); 46 int wcscoll(const wchar_t *s1, const wchar_t *s2); 47 int wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n); 48 size_t wcsxfrm(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n); 49 int wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n); 50 wchar_t *wcschr(const wchar_t *s, wchar_t c); 51 size_t wcscspn(const wchar_t *s1, const wchar_t *s2); 52 wchar_t *wcspbrk(const wchar_t *s1, const wchar_t *s2); 53 wchar_t *wcsrchr(const wchar_t *s, wchar_t c); 54 size_t wcsspn(const wchar_t *s1, const wchar_t *s2); 55 wchar_t *wcsstr(const wchar_t *s1, const wchar_t *s2); 56 wchar_t *wcstok(wchar_t * restrict s1, const wchar_t * restrict s2, wchar_t ** restrict ptr); 57 wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n); 58 size_t wcslen(const wchar_t *s); 59 wchar_t *wmemset(wchar_t *s, wchar_t c, size_t n); 60 size_t wcsftime(wchar_t * restrict s, size_t maxsize, const wchar_t * restrict format, const struct tm * restrict timeptr); 61 wint_t btowc(int c); 62 int wctob(wint_t c); 63 int mbsinit(const mbstate_t *ps); 64 size_t mbrlen(const char * restrict s, size_t n, mbstate_t * restrict ps); 65 size_t mbrtowc(wchar_t * restrict pwc, const char * restrict s, size_t n, mbstate_t * restrict ps); 66 size_t wcrtomb(char * restrict s, wchar_t wc, mbstate_t * restrict ps); 67 size_t mbsrtowcs(wchar_t * restrict dst, const char ** restrict src, size_t len, mbstate_t * restrict ps); 68 size_t wcsrtombs(char * restrict dst, const wchar_t ** restrict src, size_t len, mbstate_t * restrict ps); 69 int wcwidth(wchar_t wc); 70 .fi 71 72 .SH DESCRIPTION 73 The wchar.h header defines the macros 74 .BR NULL , 75 .BR WCHAR_MIN , 76 and 77 .BR WEOF . 78 .B WEOF 79 expands to a constant expression of type 80 .B wint_t 81 with a value that does not correspond to any member of the extended character set. 82 It is used by several functions in this header to signal end-of-file 83 or to represent a wide character value outside the extended character set. 84 .PP 85 The header also defines the following types: 86 .BR size_t ; 87 .BR wchar_t ; 88 .BR mbstate_t , 89 an object type (not an array) capable of holding 90 the state information needed to convert between multibyte and wide character sequences; 91 .BR wint_t , 92 an integer type that is not narrowed by default argument promotions 93 and can represent all members of the extended character set 94 plus at least one additional value outside that set; 95 and 96 .BR "struct tm" , 97 declared as an incomplete structure type. 98 .SH STANDARDS 99 ISO/IEC 9899:1999 Section 7.24.1 100 .SH SEE ALSO 101 .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)