(svn r19703) -Add: hexadecimal string filter

This commit is contained in:
rubidium 2010-04-24 07:31:58 +00:00
parent d8c2c261c0
commit dcf7d2de54
2 changed files with 2 additions and 0 deletions

View File

@ -202,6 +202,7 @@ bool IsValidChar(WChar key, CharSetFilter afilter)
case CS_NUMERAL: return (key >= '0' && key <= '9');
case CS_NUMERAL_SPACE: return (key >= '0' && key <= '9') || key == ' ';
case CS_ALPHA: return IsPrintable(key) && !(key >= '0' && key <= '9');
case CS_HEXADECIMAL: return (key >= '0' && key <= '9') || (key >= 'a' && key <= 'f') || (key >= 'A' && key <= 'F');
}
return false;

View File

@ -20,6 +20,7 @@ enum CharSetFilter {
CS_NUMERAL, ///< Only numeric ones
CS_NUMERAL_SPACE, ///< Only numbers and spaces
CS_ALPHA, ///< Only alphabetic values
CS_HEXADECIMAL, ///< Only hexadecimal characters
};
typedef uint32 WChar;