Provides a property argument for iswctype( )
#include <wctype.h>
wctype_t wctype ( const char *property );
The wctype( ) function constructs a value with type wctype_t that describes a class of wide characters identified by the string argument property. If property identifies a valid class of wide characters according to the LC_CTYPE category of the current locale, the wctype( ) function returns a nonzero value that is valid as the second argument to the iswctype( ) function; otherwise, it returns 0. | The strings listed in the description of the iswctype( ) function are valid in all locales as property arguments to the wctype( ) function. |
|
Example
wctype_t wct_kanji, wct_kata, wct_hira /* , ... */ ;
setlocale( LC_CTYPE, "ja_JP.UTF-8" );
if (( wct_kata = wctype( "jkata" ) ) == 0 )
wprintf( L"The locale doesn't support the wide-character type "
"string \"jkata\".\n" ), return -1;
/* ... */
wc = fgetwc( stdin );
if ( iswctype( wc, wct_kata ) ) // Mainly 0xFF66 - 0xFF9F.
wprintf( L"%lc is a katakana character.\n", wc );
See Also
iswctype( )
|