class Poco::Unicode

Overview

This class contains enumerations and static utility functions for dealing with Unicode characters and their properties. Moreā€¦

#include <Unicode.h>

class Unicode
{
public:
    // enums

    enum
    {
        UCP_MAX_CODEPOINT = 0x10FFFF,
    };

    enum CharacterCategory;
    enum CharacterType;
    enum Script;

    // structs

    struct CharacterProperties;

    // methods

    static
    void
    properties(
        int ch,
        CharacterProperties& props
        );

    static
    bool
    isSpace(int ch);

    static
    bool
    isDigit(int ch);

    static
    bool
    isPunct(int ch);

    static
    bool
    isAlpha(int ch);

    static
    bool
    isLower(int ch);

    static
    bool
    isUpper(int ch);

    static
    int
    toLower(int ch);

    static
    int
    toUpper(int ch);
};

Detailed Documentation

This class contains enumerations and static utility functions for dealing with Unicode characters and their properties.

For more information on Unicode, see http://www.unicode.org.

The implementation is based on the Unicode support functions in PCRE.

Methods

static
void
properties(
    int ch,
    CharacterProperties& props
    )

Return the Unicode character properties for the character with the given Unicode value.

static
bool
isSpace(int ch)

Returns true iff the given character is a separator.

static
bool
isDigit(int ch)

Returns true iff the given character is a numeric character.

static
bool
isPunct(int ch)

Returns true iff the given character is a punctuation character.

static
bool
isAlpha(int ch)

Returns true iff the given character is a letter.

static
bool
isLower(int ch)

Returns true iff the given character is a lowercase character.

static
bool
isUpper(int ch)

Returns true iff the given character is an uppercase character.

static
int
toLower(int ch)

If the given character is an uppercase character, return its lowercase counterpart, otherwise return the character.

static
int
toUpper(int ch)

If the given character is a lowercase character, return its uppercase counterpart, otherwise return the character.