[DEV] add a checker of not char element

This commit is contained in:
Edouard DUPIN 2013-10-17 21:42:01 +02:00
parent 21c190edee
commit e889200de8
2 changed files with 12 additions and 0 deletions

View File

@ -95,6 +95,17 @@ bool etk::UniChar::isWhiteChar(void) const
return false; return false;
} }
bool etk::UniChar::isSpecialChar(void) const
{
if( m_value < '0'
|| (m_value > '9' && m_value < 'A')
|| (m_value > 'Z' && m_value < 'a')
|| (m_value > 'z' && m_value < 0xFF) ) {
return true;
}
return false;
}
bool etk::UniChar::isInteger(void) const bool etk::UniChar::isInteger(void) const
{ {
if( m_value>=(uint32_t)'0' if( m_value>=(uint32_t)'0'

View File

@ -157,6 +157,7 @@ namespace etk
* @return tue if it is white char * @return tue if it is white char
*/ */
bool isWhiteChar(void) const; bool isWhiteChar(void) const;
bool isSpecialChar(void) const;
/** /**
* @brief check if the curent element is number or not * @brief check if the curent element is number or not
* @return tue if it is a number char * @return tue if it is a number char