Monday, October 31, 2016

C Library Function – wchar

The <wchar.h> header shall define the following function(s).

Formatted wide character input/output Functions:
wscanf int wscanf( const wchar_t *format, ... );
fwscanf int fwscanf( FILE *stream, const wchar_t *format, ... );
swscanf int swscanf( const wchar_t *buffer, const wchar_t *format, ... );
wscanf_s(C11) int wscanf_s( const wchar_t *restrict format, ...);
fwscanf_s(C11) int fwscanf_s( FILE *restrict stream, const wchar_t *restrict format, ...);
swscanf_s(C11) int swscanf_s( const wchar_t *restrict buffer, const wchar_t *restrict format, ...);
vwscanf(C99) int vwscanf( const wchar_t * format, va_list arg );
vfwscanf(C99) int vfwscanf( FILE *stream, const wchar_t *format, va_list arg );
vswscanf(C99) int vswscanf( const wchar_t * buffer, const wchar_t *format, va_list arg );
vwscanf_s(C11) int vwscanf_s( const wchar_t *restrict format, va_list arg );
vfwscanf_s(C11) int vfwscanf_s( FILE * restrict stream, const wchar_t *restrict format, va_list arg );
vswscanf_s(C11) int vswscanf_s( const wchar_t *restrict buffer, const wchar_t *restrict format, va_list arg );
wprintf int wprintf( const wchar_t * format, ... );
fwprintf int fwprintf( FILE *stream, const wchar_t * format, ... );
swprint int swprintf( wchar_t *buffer, size_t bufsz, const wchar_t * format, ... );
wprintf_s(C11) int wprintf_s( const wchar_t *restrict format, ...);
fwprintf_s(C11) int fwprintf_s( FILE *restrict stream, const wchar_t *restrict format, ...);
swprint_s(C11) int swprintf_s( wchar_t *restrict buffer, rsize_t bufsz, const wchar_t * restrict format, ...);
snwprintf_s(C11) int snwprintf_s( wchar_t * restrict buffer, rsize_t bufsz, const wchar_t * restrict format, ...);
vwprintf int vwprintf( const wchar_t * format, va_list arg );
vfwprintf int vfwprintf( FILE* stream, const wchar_t * format, va_list arg );
vswprintf int vswprintf( const wchar_t * buffer, size_t bufsz, const wchar_t * format, va_list arg );
vwprintf_s(C11) int vwprintf_s( const wchar_t * restrict format, va_list arg);
vfwprintf_s(C11) int vfwprintf_s( FILE * restrict stream, const wchar_t *restrict format, va_list arg);
vswprint_s(C11) int vswprintf_s( wchar_t * restrict buffer, rsize_t bufsz, const wchar_t * restrict format, va_list arg);
vsnwprintf_s(C11) int vsnwprintf_s( wchar_t *restrict buffer, rsize_t bufsz, const wchar_t *restrict format, va_list arg);

Wide character input/output Functions:
fgetwc wint_t fgetwc(FILE *stream);
fgetws wchar_t *fgetws(wchar_t * restrict s, int n, FILE * restrict stream);
fputwc wint_t fputwc(wchar_t c, FILE *stream);
fputws int fputws(const wchar_t * restrict s, FILE * restrict stream);
fwide int fwide (FILE* stream, int mode);
getwc wint_t getwc(FILE *stream);
getwchar wint_t getwchar(void);
putwc wint_t putwc(wchar_t c, FILE *stream);
putwchar wint_t putwchar(wchar_t c);
ungetwc wint_t ungetwc(wint_t c, FILE *stream);

Wide string numeric conversion Functions:
wcstol(C95) long wcstol( const wchar_t * str, wchar_t ** str_end, int base );
wcstoll(C99) long long wcstoll( const wchar_t * str, wchar_t ** str_end, int base );
wcstoul(C95) unsigned long wcstoul( const wchar_t * str, wchar_t ** str_end, int base );
wcstoull(C99) unsigned long long wcstoull( const wchar_t * str, wchar_t ** str_end, int base );
wcstof(C99) float wcstof( const wchar_t * str, wchar_t ** str_end );
wcstod(C95) double wcstod( const wchar_t * str, wchar_t ** str_end );
wcstold(C99) long double wcstold( const wchar_t * str, wchar_t ** str_end );

Wide string copying Functions:
wcscpy(C95) wchar_t *wcscpy( wchar_t *dest, const wchar_t *src );
wcscpy_s(C11) errno_t wcscpy_s( wchar_t *restrict dest, rsize_t destsz, const wchar_t *restrict src );
wcsncpy(C95) wchar_t * wcsncpy( wchar_t * dest, const wchar_t * src, size_t count );
wcsncpy_s(C11) errno_t wcsncpy_s( wchar_t *restrict dest, rsize_t destsz, const wchar_t *restrict src, rsize_t n);
wmemcpy(C95) wchar_t * wmemcpy( wchar_t * dest, const wchar_t * src, size_t count );
wmemcpy_s(C11) errno_t wmemcpy_s( wchar_t *restrict dest, rsize_t destsz, const wchar_t *restrict src, rsize_t count );
wmemmove(C95) wchar_t * wmemmove( wchar_t * dest, const wchar_t * src, size_t count );
wmemmove_s(C11) errno_t wmemmove_s( wchar_t *dest, rsize_t destsz, const wchar_t *src, rsize_t count);

Wide string concatenation Functions:
wcscat(C95) wchar_t *wcscat( wchar_t *dest, const wchar_t *src );
wcscat_s(C11) errno_t wcscat_s(wchar_t *restrict dest, rsize_t destsz, const wchar_t *restrict src);
wcsncat(C95) wchar_t *wcsncat( wchar_t *dest, const wchar_t *src, size_t count );
wcsncat_s(C11) errno_t wcsncat_s( wchar_t *restrict dest, rsize_t destsz, const wchar_t *restrict src, rsize_t count );

Wide string comparison Functions:
wcsxfrm(C95) size_t wcsxfrm( wchar_t * dest, const wchar_t * src, size_t count );
wcscmp(C95) int wcscmp( const wchar_t *lhs, const wchar_t *rhs );
wcsncmp(C95) int wcsncmp( const wchar_t * lhs, const wchar_t * rhs, size_t count );
wcscoll(C95) int wcscoll( const wchar_t *lhs, const wchar_t *rhs );
wmemcmp(C95) int wmemcmp( const wchar_t *lhs, const wchar_t *rhs, size_t count );

Wide string search Functions:
wcschr(C95) wchar_t * wcschr( const wchar_t * str, wchar_t ch );
wcsrchr(C95) wchar_t * wcsrchr( const wchar_t * str, wchar_t ch );
wcsspn(C95) size_t wcsspn( const wchar_t * dest, const wchar_t * src );
wcscspn(C95) size_t wcscspn( const wchar_t * dest, const wchar_t * src );
wcspbrk(C95) wchar_t * wcspbrk( const wchar_t * dest, const wchar_t * str );
wcsstr(C95) wchar_t * wcsstr( const wchar_t * dest, const wchar_t * src );
wcstok(C95) wchar_t * wcstok( wchar_t * str, const wchar_t * delim, wchar_t **ptr );
wcstok_s(C11) wchar_t *wcstok_s( wchar_t *restrict str, rsize_t *restrict strmax, const wchar_t *restrict delim, wchar_t **restrict ptr);
wmemchr(C95) wchar_t *wmemchr( const wchar_t *ptr, wchar_t ch, size_t count );

Miscellaneous Functions:
wcslen(C95) size_t wcslen( const wchar_t *str );
wcsnlen_s(C11) size_t wcsnlen_s(const wchar_t *str, size_t strsz);
wmemset(C95) wchar_t *wmemset( wchar_t *dest, wchar_t ch, size_t count );

Wide character time conversion Functions:
wcsftime(C95) size_t wcsftime( wchar_t * str, size_t count, const wchar_t * format, tm* time );

Single-byte/wide character conversion Functions:
btowc wint_t btowc( int c );
wctob int wctob(wint_t c );

Conversion state Functions:
mbsinit int mbsinit( const mbstate_t* ps);

Restartable multibyte/wide character conversion Functions:
mbrlen size_t mbrlen( const char* s, size_t n, mbstate_t* ps );
mbrtowc size_t mbrtowc(wchar_t * restrict pwc, const char * restrict s, size_t n, mbstate_t * restrict ps);
wcrtomb size_t wcrtomb(char *s, wchar_t wc, mbstate_t *ps);
wcrtomb_s(C11) errno_t wcrtomb_s(size_t *restrict retval, char *restrict s, rsize_t ssz, wchar_t wc, mbstate_t *restrict ps);

Restartable multibyte/wide string conversion Functions:
mbsrtowcs size_t mbsrtowcs( wchar_t * dst, const char** src, size_t len, mbstate_t* ps );
mbsrtowcs_s(C11) errno_t mbsrtowcs_s(size_t *restrict retval, wchar_t *restrict dst, rsize_t dstsz, const char **restrict src, rsize_t len, mbstate_t *restrict ps);
wcsrtombs size_t wcsrtombs(char *dst, const wchar_t **src, size_t len, mbstate_t* ps );
wcsrtombs_s(C11) errno_t wcsrtombs_s(size_t *restrict retval, char *restrict dst, rsize_t dstsz, const wchar_t **restrict src, rsize_t len, mbstate_t *restrict ps);



Related topics:
Library Functions in C   |   Standard Library in C   |   Header Files in C   |   Functions in C   |   Keywords in C   |   Data Types in C   |   Pointers in C

List of topics: C Programming

No comments:

Post a Comment