A data type representing a character mapping descriptor used for wide-character transformations. It is typically obtained using the `wctrans` function to specify transformations like `tolower` or `toupper` for wide characters.
A string representing the name of the character mapping property, such as "tolower" or "toupper".
Read more about parameters of wctrans in parameters section
The wctransfunction in C language Returns a type that represents a class of wide characters that can be converted to each other (e.g., tolower, toupper).
wctrans constructs a value with type wctrans_t that describes a mapping between wide characters identified by the string argument property. If property identifies a valid mapping of wide characters according to the LC_CTYPE category of the current locale, the wctrans function returns a nonzero value that is valid as the second argument to the towctrans function; otherwise, it returns zero.
The wctransfunction takes 1
parameter:
•
const char * `property`: A string representing the name of the character mapping property, such as "tolower" or "toupper".
Retrieves a character mapping descriptor corresponding to the specified property name. The descriptor can be used with the `towctrans` function to perform locale-specific character transformations. Returns a nonzero `wctrans_t` value if the property is valid, or `0` if it is invalid.
The wctrans function return value :
Returns a value of type wctrans_t, which represents the mapping described by property
If the given property is not valid, it returns zero
Output
This example demonstrates the basic usage of wctrans to obtain transformation descriptors for lowercase and uppercase conversions.