Testing for Membership in a Class

A very common operation, and one that can't always be handled by out-of-the-box software, is testing a character for membership in a particular category of characters. For those categories that are defined by the Unicode standard, such as lowercase letters or combining diacritical marks, the standard Unicode libraries almost always provide relevant APIs. In addition, many APIs provide functions to perform character-class-membership queries that are specific to their environment—for example, the Java class libraries provide methods for testing whether a character is legal in a Java identifier.

If the test you're seeking is available in an API library at your disposal (such as testing whether a character is a letter, ...

Get Unicode Demystified now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.