WCHAR.H(3) Library Functions Manual WCHAR.H(3)

NAME

wchar.hwide character & wide character string manipulation

SYNOPSIS

#include <wchar.h>

DESCRIPTION

The <wchar.h> header provides functions for manipulating wide character strings" "for converting between wide characters and multibyte character sets" "for manipulating wide character strings" "and for wide character oriented input and output.

Types & Definitions

The type size_t and macro NULL shall be defined as in <stddef.h>.

The type wchar_t shall be defined as an integral type capable of representing any wide character in the implementation defined encoding. The type wint_t shall be defined as an integral type capable of representing any wide character in the implementation defined encoding" "plus the distinct value given by WEOF, which evaluates to a constant expression of type wint_t which does not correspond to any character in the implementation defined character set. The macros WCHAR_MIN and WCHAR_MAX shall be defined as in <stdint.h>.

The type mbstate_t shall be a complete non-array object type used for the storage of the state of a multibyte to wide character conversion.

The type struct tm shall be defined as an incomplete type" "a full definition of wich can be found in <time.h>.

Wide Character String Handling Functions

wchar_t *wcscpy(wchar_t *restrict s1, const wchar_t *restrict s2)
 
wchar_t *wcsncpy(wchar_t *restrict s1, const wchar_t *restrict s2, size_t n)
 
wchar_t *wmemcpy(wchar_t *restrict s1, const wchar_t *restrict s2, size_t n)
 
wchar_t *wmemmove(wchar_t *s1, const wchar_t *s2, size_t n)
 
wchar_t *wcscat(wchar_t *restrict s1, const wchar_t *restrict s2)
 
wchar_t *wcsncat(wchar_t *restrict s1, const wchar_t *restrict s2, size_t n)
 
int wcscmp(const wchar_t *s1, const wchar_t *s2)
 
int wcscoll(const wchar_t *s1, const wchar_t *s2)
 
int wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n)
 
size_t wcsxfrm(wchar_t *restrict s1, const wchar_t *restrict s2, size_t n)
 
int wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n)
 
wchar_t *wcschr(const wchar_t *s, wchar_t c)
 
size_t wcscspn(const wchar_t *s1, const wchar_t *s2)
 
wchar_t *wcspbrk(const wchar_t *s1, const wchar_t *s2)
 
wchar_t *wcsrchr(const wchar_t *s, wchar_t c)
 
size_t wcsspn(const wchar_t *s1, const wchar_t *s2)
 
wchar_t *wcsstr(const wchar_t *s1, const wchar_t *s2)
 
wchar_t *wcstok(wchar_t *restrict s1, const wchar_t *restrict s2, wchar_t **restrict ptr)
 
wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n)
 
size_t wcslen(const wchar_t *s)
 
wchar_t *wmemset(wchar_t *s, wchar_t c, size_t n)

Wide Character String Formatting

int swprintf(wchar_t *restrict s, size_t n, const wchar_t *restrict format, ...)
 
int swscanf(const wchar_t *restrict s, const wchar_t *restrict format, ...)
 
int vswprintf(wchar_t *restrict s, size_t n, const wchar_t *restrict format, va_list arg)
 
int vswscanf(const wchar_t *restrict s, const wchar_t *restrict format, va_list arg)
 
size_t wcsftime(wchar_t *restrict s, size_t maxsize, const wchar_t *restrict format, const struct tm *restrict timeptr)

Wide Character Input and Output

int fwprintf(FILE *restrict stream, const wchar_t *restrict format, ...)
 
int fwscanf(FILE *restrict stream, const wchar_t *restrict format, ...)
 
int vfwprintf(FILE *restrict stream, const wchar_t *restrict format, va_list arg)
 
int vfwscanf(FILE *restrict stream, const wchar_t *restrict format, va_list arg)
 
int vwprintf(const wchar_t *restrict format, va_list arg)
 
int vwscanf(const wchar_t *restrict format, va_list arg)
 
int wprintf(const wchar_t *restrict format, ...)
 
int wscanf(const wchar_t *restrict format, ...)
 
wint_t fgetwc(FILE *stream)
 
wchar_t *fgetws(wchar_t *restrict s, int n, FILE *restrict stream)
 
wint_t fputwc(wchar_t c, FILE *stream)
 
int fputws(const wchar_t *restrict s, FILE *restrict stream)
 
int fwide(FILE *stream, int mode)
 
wint_t getwc(FILE *stream)
 
wint_t getwchar(void)
 
wint_t putwc(wchar_t c, FILE *stream)
 
wint_t putwchar(wchar_t c)
 
wint_t ungetwc(wint_t c, FILE *stream)

Wide Character String Parsing

double wcstod(const wchar_t *restrict nptr, wchar_t **restrict endptr)
 
float wcstof(const wchar_t *restrict nptr, wchar_t **restrict endptr)
 
long double wcstold(const wchar_t *restrict nptr, wchar_t **restrict endptr)
 
long int wcstol(const wchar_t *restrict nptr, wchar_t **restrict endptr, int base)
 
long long int wcstoll(const wchar_t *restrict nptr, wchar_t **restrict endptr, int base)
 
unsigned long int wcstoul(const wchar_t *restrict nptr, wchar_t **restrict endptr, int base)
 
unsigned long long int wcstoull(const wchar_t *restrict nptr, wchar_t **restrict endptr, int base)

Character Set Conversion

wint_t btowc(int c)
 
int wctob(wint_t c)
 
int mbsinit(const mbstate_t *ps)
 
size_t mbrlen(const char *restrict s, size_t n, mbstate_t *restrict ps)
 
size_t mbrtowc(wchar_t *restrict pwc, const char *restrict s, size_t n, mbstate_t *restrict ps)
 
size_t wcrtomb(char *restrict s, wchar_t wc, mbstate_t *restrict ps)
 
size_t mbsrtowcs(wchar_t *restrict dst, const char **restrict src, size_t len, mbstate_t *restrict ps)
 
size_t wcsrtombs(char *restrict dst, const wchar_t **restrict src, size_t len, mbstate_t *restrict ps)

SEE ALSO

string.h(3) uchar.h(3) wcscpy(3) wcsncpy(3) wmemcpy(3) wmemmove(3) wcscat(3) wcsncat(3) wcscmp(3) wcscoll(3) wcsncmp(3) wcsxfrm(3) wmemcmp(3) wcschr(3) wcscspn(3) wcspbrk(3) wcsrchr(3) wcsspn(3) wcsstr(3) wcstok(3) wmemchr(3) wcslen(3) wmemset(3) swprintf(3) swscanf(3) vswprintf(3) vswscanf(3) wcsftime(3) fwprintf(3) fwscanf(3) vfwprintf(3) vfwscanf(3) vwprintf(3) vwscanf(3) wprintf(3) wscanf(3) fgetwc(3) fgetws(3) fputwc(3) fputws(3) fwide(3) getwc(3) getwchar(3) putwc(3) putwchar(3) ungetwc(3) wcstod(3) wcstof(3) wcstold(3) wcstol(3) wcstoll(3) wcstoul(3) wcstoull(3) btowc(3) wctomb(3) mbsinit(3) mbrlen(3) mbrtowc(3) wcrtomb(3) mbsrtowcs(3) wcsrtombs(3)

STANDARDS

Conforming to ISO/IEC 9899/AMD1:1995 (“ISO C90, Amendment 1”), ISO/IEC 9899:1999 (“ISO C99”) and ISO/IEC 9899:2011 (“ISO C11”).
February 20, 2013 Fusion