charclass.h revision 5c094164a11df18b51ec8ae62f8630873fe45436
#ifndef __CHARCLASS_H__
#define __CHARCLASS_H__
/**
*
* Phoebe DOM Implementation.
*
* This is a C++ approximation of the W3C DOM model, which follows
* fairly closely the specifications in the various .idl files, copies of
* which are provided for reference. Most important is this one:
*
* Authors:
* Bob Jamison
*
* Copyright (C) 2008 Bob Jamison
*
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
/**
* Enumerated Unicode general category types
*/
typedef enum UniCharType
{
UNI_UNASSIGNED = 0, /* Cn */
} UniCharType;
/**
* Get the raw table entry for this Unicode codepoint
* @param ch the Unicode codepoint to test
* @return the raw UCD property table entry
*/
/**
* Get the Unicode General Category of ths character
* @param ch the Unicode codepoint to test
* @return the 'UniCharType' General Category enumeration (above)
*/
/**
* Test if this Unicode code point is lower case
* @param ch the Unicode codepoint to test
* @return 1 if successful, else 0
*/
int uni_is_lower(int ch);
/**
* Test if this Unicode code point is upper case
* @param ch the Unicode codepoint to test
* @return 1 if successful, else 0
*/
int uni_is_upper(int ch);
/**
* Test if this Unicode code point is title case
* @param ch the Unicode codepoint to test
* @return 1 if successful, else 0
*/
int uni_is_title(int ch);
/**
* Test if this Unicode code point is a numeric digit
* @param ch the Unicode codepoint to test
* @return 1 if successful, else 0
*/
int uni_is_digit(int ch);
/**
* Test if this Unicode code point is defined in the database
* @param ch the Unicode codepoint to test
* @return 1 if successful, else 0
*/
int uni_is_defined(int ch);
/**
* Test if this Unicode code point is a letter
* @param ch the Unicode codepoint to test
* @return 1 if successful, else 0
*/
int uni_is_letter(int ch);
/**
* Test if this Unicode code point is a letter or a digit
* @param ch the Unicode codepoint to test
* @return 1 if successful, else 0
*/
int uni_is_letter_or_digit(int ch);
/**
* Test if this Unicode code point is considered to be a space
* @param ch the Unicode codepoint to test
* @return 1 if successful, else 0
*/
int uni_is_space(int ch);
#endif /* __CHARCLASS_H__ */