common: Added unicodeLatinDigit

This commit is contained in:
Paul Beckingham 2016-01-14 22:02:46 -05:00
parent 8db7077e12
commit 999cdf0007
2 changed files with 10 additions and 0 deletions

View file

@ -78,3 +78,12 @@ bool unicodeLatinAlpha (unsigned int c)
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// Digits 0-9.
//
// TODO This list should be derived from the Unicode database.
bool unicodeLatinDigit (unsigned int c)
{
return c >= 0x30 && c <= 0x39;
}
////////////////////////////////////////////////////////////////////////////////

View file

@ -29,6 +29,7 @@
bool unicodeWhitespace (unsigned int); bool unicodeWhitespace (unsigned int);
bool unicodeLatinAlpha (unsigned int); bool unicodeLatinAlpha (unsigned int);
bool unicodeLatinDigit (unsigned int);
#endif #endif
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////