diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-29 00:36:22 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-29 09:56:08 +0100 |
commit | 3829892dbc5475a49250729541be369ea9532d28 (patch) | |
tree | 9a57bc4865772c6613db2c71c6fde609d8563e09 /comphelper | |
parent | de82a40f84c69081a517617989c344ec9597cb45 (diff) |
merge together 5 or ascii isalpha/isalnum/isdigit implementations
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/inc/comphelper/string.hxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/comphelper/inc/comphelper/string.hxx b/comphelper/inc/comphelper/string.hxx index 627c04c984bf..0fadc73d16e7 100644 --- a/comphelper/inc/comphelper/string.hxx +++ b/comphelper/inc/comphelper/string.hxx @@ -353,6 +353,11 @@ COMPHELPER_DLLPUBLIC inline bool isdigitAscii(sal_Unicode c) return ((c >= '0') && (c <= '9')); } +COMPHELPER_DLLPUBLIC inline bool isxdigitAscii(sal_Unicode c) +{ + return isdigitAscii(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f'); +} + COMPHELPER_DLLPUBLIC inline bool islowerAscii(sal_Unicode c) { return ((c >= 'a') && (c <= 'z')); @@ -363,9 +368,14 @@ COMPHELPER_DLLPUBLIC inline bool isupperAscii(sal_Unicode c) return ((c >= 'A') && (c <= 'Z')); } +COMPHELPER_DLLPUBLIC inline bool isalphaAscii(sal_Unicode c) +{ + return islowerAscii(c) || isupperAscii(c); +} + COMPHELPER_DLLPUBLIC inline bool isalnumAscii(sal_Unicode c) { - return isdigitAscii(c) || islowerAscii(c) || isupperAscii(c); + return isalphaAscii(c) || isdigitAscii(c); } } } |