aboutsummaryrefslogtreecommitdiff
path: root/src/shared/Util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/Util.h')
-rw-r--r--src/shared/Util.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/shared/Util.h b/src/shared/Util.h
index 690f1ec0ac0..44c0dda8370 100644
--- a/src/shared/Util.h
+++ b/src/shared/Util.h
@@ -172,9 +172,19 @@ inline bool isEastAsianCharacter(wchar_t wchar)
return false;
}
+inline bool isNumeric(wchar_t wchar)
+{
+ return (wchar >= L'0' && wchar <=L'9');
+}
+
+inline bool isNumeric(char c)
+{
+ return (c >= '0' && c <='9');
+}
+
inline bool isNumericOrSpace(wchar_t wchar)
{
- return (wchar >= L'0' && wchar <=L'9') || wchar == L' ';
+ return isNumeric(wchar) || wchar == L' ';
}
inline bool isBasicLatinString(std::wstring wstr, bool numericOrSpace)