A data type used to represent a character classification descriptor. This descriptor is used with functions like `iswctype` to test wide characters against specific character classes.
A string representing the name of the character classification property, such as "alpha", "digit", or "space".
Read more about parameters of wctype in parameters section
The wctypefunction in C language Returns a value representing a class of wide characters according to a property name like 'alnum', 'alpha', etc.
wctype constructs a value of type wctype_t that describes a class of wide characters identified by the string argument property. This value can be used as the second argument to the iswctype function. The wctype function determines character classes based on the LC_CTYPE category of the current locale.
The wctypefunction takes 1
parameter:
•
const char * `property`: A string representing the name of the character classification property, such as "alpha", "digit", or "space".
Retrieves a wide-character classification descriptor corresponding to the specified property name. The descriptor can be used with `iswctype` to test wide characters against the specified classification. Returns a nonzero `wctype_t` value if the property is valid, or `0` if it is invalid.
The wctype function return value :
Returns a value of type wctype_t that represents the character class described by property
If the given property is not valid for the current locale, it returns zero
Output
This example demonstrates the basic usage of wctype to create character class descriptors and test characters against these classes.