UniQueryAlnum

UniQueryAlnum queries character attributes.

Syntax
int UniQueryAlnum (const LocaleObject locale_object, UniChar uc)

Parameters

 * locale_object (const LocaleObject) : A locale object created by UniCreateLocaleObject or NULL.
 * uc (UniChar) : The UniChar character to query.

Returns

 * return value (int)  -  returns : If the result of the test is true, the function returns 1. Otherwise, 0 is returned.

Remarks
This function provides the functionality of UniCreateAttrObject, UniQueryCharAttr, and UniFreeAttrObject as an atomic operation for the invariant attributes.

The locale may be specified as NULL to indicate default Unicode character attributes.

Example
 This example shows how to query character attributes.
 * 1) include 

int main(void) { LocaleObject locale_object = NULL; int         result = 0; int         rc = ULS_SUCCESS; UniChar     uni_char = L'a';    /* Unicode lowercase Latin letter a */ /*****************************************************************/        /* Assumes LANG environment variable set to a valid locale name, */ /* such as fr_FR                                                */ /*****************************************************************/        rc = UniCreateLocaleObject(UNI_UCS_STRING_POINTER,                                   (UniChar *)L"", &locale_object); if (rc != ULS_SUCCESS) { printf("UniCreateLocaleObject error: return code = %u\n", rc); return 1; }        /* Query character attribute */ result = UniQueryAlnum(locale_object, uni_char); if (result) printf("UniChar character %04X is alphanumeric\n", uni_char); else printf("UniChar character %04X is not alphanumeric\n", uni_char);
 * 1) include 

return ULS_SUCCESS; } 

Format

 * 1) include 

int UniQueryAlnum (const LocaleObject locale_object, UniChar uc) 

Related Functions

 * UniQueryAttr
 * UniQueryChar
 * UniQueryCharAttr
 * UniQueryCharType