UniQueryAlpha
From EDM2
UniQueryAlpha queries character attributes.
Syntax
int UniQueryAlpha (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.
#include <stdio.h> #include <unidef.h> int main(void) { int result = 0; int rc = ULS_SUCCESS; UniChar uni_char = L'a'; /* Unicode lowercase Latin letter a */ /* Query character attribute */ result = UniQueryAlpha(NULL, uni_char); if (result) printf("UniChar character %04X is alphabetic\n", uni_char); else printf("UniChar character %04X is not alphabetic\n", uni_char); return ULS_SUCCESS; }
Format
#include <unidef.h> int UniQueryAlpha (const LocaleObject locale_object, UniChar uc)