![The C Standard Library Reference](/c_standard_library/images/c-mini-logo.jpg)
- The C Standard Library
- C Library - Home
- C Library - <assert.h>
- C Library - <complex.h>
- C Library - <ctype.h>
- C Library - <errno.h>
- C Library - <fenv.h>
- C Library - <float.h>
- C Library - <inttypes.h>
- C Library - <iso646.h>
- C Library - <limits.h>
- C Library - <locale.h>
- C Library - <math.h>
- C Library - <setjmp.h>
- C Library - <signal.h>
- C Library - <stdalign.h>
- C Library - <stdarg.h>
- C Library - <stdbool.h>
- C Library - <stddef.h>
- C Library - <stdio.h>
- C Library - <stdlib.h>
- C Library - <string.h>
- C Library - <tgmath.h>
- C Library - <time.h>
- C Library - <wctype.h>
- C Standard Library Resources
- C Library - Quick Guide
- C Library - Useful Resources
- C Library - Discussion
- C Programming Resources
- C Programming - Tutorial
- C - Useful Resources
C Library - <wctype.h>
The wctype.h header file is part of the standard C library, defining various functions and macros for classifying and mapping wide characters. It declares the types wint_t and wctype_t.
Library Macros
Following are the macros defined in the header wctype.h −
Sr.No. | Macro & Description |
---|---|
1 |
WEOF This is a non-character value of type wint_t used to indicate errors. |
2 |
WCHAR_MIN The smallest valid value of wchar_t. |
3 |
WCHAR_MAX The largest valid value of wchar_t. |
Library Functions
Following are the functions defined in the header wctype.h −
Sr.No. | Function & Description |
---|---|
1 |
int iswalnum( wint_t ch )
This function checks if a wide character is alphanumeric. |
2 |
int iswalpha( wint_t ch )
This function checks if a wide character is alphabetic. |
3 |
int iswlower( wint_t ch )
This function checks if a wide character is an lowercase character. |
4 |
int iswupper( wint_t ch )
This function checks if a wide character is an uppercase character. |
5 |
int iswdigit( wint_t ch )
This function checks if a wide character is a digit. |
6 |
int iswxdigit( wint_t ch )
This function checks if a wide character is a hexadecimal character. |
7 |
int iswcntrl( wint_t ch )
This function checks if a wide character is a control character. |
8 |
int iswgraph( wint_t ch )
This function checks if a wide character is a graphical character. |
9 |
int iswspace( wint_t ch )
This function checks if a wide character is a space character. |
10 |
int iswblank( wint_t ch )
This function checks if a wide character is a blank character. |
11 |
int iswprint( wint_t ch )
This function checks if a wide character is a printing character. |
12 |
int iswpunct( wint_t ch )
This function checks if a wide character is a punctuation character. |
13 |
int iswctype( wint_t wc, wctype_t desc )
This function classifies a wide character according to the specified LC_CTYPE category. |
14 |
wctype_t wctype( const char* str )
This function looks up a character classification category in the current C locale. |
15 |
wint_t towlower( wint_t wc )
This function converts a wide character to lowercase. |
16 |
wint_t towupper(wint_t wc)
This function converts a wide character to uppercase. |
17 |
wint_t towctrans( wint_t wc, wctrans_t desc )
This function performs character mapping according to the specified LC_CTYPE mapping category. |
18 |
wctrans_t wctrans( const char* str )
This function looks up a character mapping category in the current C locale. |