diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2024-01-04 21:21:43 +0200 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2024-01-04 21:21:43 +0200 |
commit | 4e158f6bfa7d0747d8da70b3b15a44b52e35bb8a (patch) | |
tree | 84e20982138de5c9b6d319bf83ac79bd672f918f /src/corelib/tools/qtools_p.h | |
parent | e4391422574aa9aa89fece74f16c07c609cbbae2 (diff) | |
parent | a13fd415d689be046c13cc562cbbbb5df0e6506a (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.13' into tqtc/lts-5.15-opensourcev5.15.13-lts-lgpl
Change-Id: Ie9df84af22570d601db002e391a1a0d97e7cd9e1
Diffstat (limited to 'src/corelib/tools/qtools_p.h')
-rw-r--r-- | src/corelib/tools/qtools_p.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/corelib/tools/qtools_p.h b/src/corelib/tools/qtools_p.h index d48318b474..ca52b15870 100644 --- a/src/corelib/tools/qtools_p.h +++ b/src/corelib/tools/qtools_p.h @@ -84,6 +84,17 @@ Q_DECL_CONSTEXPR inline int fromOct(uint c) noexcept { return ((c >= '0') && (c <= '7')) ? int(c - '0') : -1; } + +constexpr inline char toAsciiLower(char ch) noexcept +{ + return (ch >= 'A' && ch <= 'Z') ? ch - 'A' + 'a' : ch; +} + +constexpr inline char toAsciiUpper(char ch) noexcept +{ + return (ch >= 'a' && ch <= 'z') ? ch - 'a' + 'A' : ch; +} + } // We typically need an extra bit for qNextPowerOfTwo when determining the next allocation size. |