diff options
| author | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-08-22 21:23:58 -0700 |
|---|---|---|
| committer | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-12-15 19:50:34 -0800 |
| commit | 826e2bbf98ca5c6088c3d19968272b29fc335972 (patch) | |
| tree | bcc910466200f8ce6b8f2fc16a10bd385c2c8be2 /Source/Core/Common/StringUtil.h | |
| parent | b4a196731056e458a45f99ea2bb10f0eda19c774 (diff) | |
StringUtil: More Wrappers For <cctype>
`Common::IsLower(char)` was omitted as nothing needed it.
Diffstat (limited to 'Source/Core/Common/StringUtil.h')
| -rw-r--r-- | Source/Core/Common/StringUtil.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/Core/Common/StringUtil.h b/Source/Core/Common/StringUtil.h index 8aa5bd3f68..8ccc05ee6b 100644 --- a/Source/Core/Common/StringUtil.h +++ b/Source/Core/Common/StringUtil.h @@ -275,6 +275,21 @@ inline bool IsAlpha(char c) return std::isalpha(c, std::locale::classic()); } +inline bool IsAlnum(char c) +{ + return std::isalnum(c, std::locale::classic()); +} + +inline bool IsUpper(char c) +{ + return std::isupper(c, std::locale::classic()); +} + +inline bool IsXDigit(char c) +{ + return std::isxdigit(c /* no locale needed */) != 0; +} + inline char ToLower(char ch) { return std::tolower(ch, std::locale::classic()); |
