wctype


wctype

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( )



C(c) In a Nutshell
C in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596006977
EAN: 2147483647
Year: 2006
Pages: 473

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net