UniQueryChar

UniQueryChar determines if the character supplied has the attribute(s) requested.

Syntax
int UniQueryChar (UniChar uc, ULONG attr)

Parameters

 * uc (UniChar) : The Unicode character whose attribute(s) are being examined.
 * attr (ULONG) : The attribute being examined in the Unicode character.

Returns
Return value (int)  -  returns


 * 0 : The specified attribute is false for the specified Unicode character.
 * 1 : The specified attribute is true for the specified Unicode character.

Remarks
This function takes the attributes supplied by the caller and tests the character to determine if they are true for that Unicode character. Attribute values are listed under UniQueryAttr; only the standard POSIX attributes (CT_* or C1_*) may be used.

Example
This example shows how to query if a character has particular attributes. 
 * 1) include 
 * 2) include 

int main(void) {

int         result = 0; UniChar     uni_char = L'A';    /* Unicode A character */

/* Query character for upper case and graphic attributes */ result = UniQueryChar(uni_char, C1_UPPER | C1_GRAPH); if (result) printf("UniChar is upper case and a graphic character\n"); else printf("UniChar is not upper case and a graphic character\n"_;

return ULS_SUCCESS; } 

Format

 * 1) include 

int UniQueryChar (   UniChar uc,     /* I  - Character to query      */    ULONG   attr    /* I  - Symbolic attribute name */ ) 

Related Functions

 * UniQueryAttr
 * UniQueryCharAttr
 * UniQueryCharType