util/CharUtil: add ToLowerASCII()
This commit is contained in:
parent
e8a5a9b1e8
commit
2ccfb71d12
@ -126,4 +126,17 @@ ToUpperASCII(char ch)
|
||||
: ch;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the specified ASCII character (0x00..0x7f) to lower case.
|
||||
* Unlike toupper(), it ignores the system locale.
|
||||
*/
|
||||
constexpr
|
||||
static inline char
|
||||
ToLowerASCII(char ch)
|
||||
{
|
||||
return ch >= 'A' && ch <= 'Z'
|
||||
? (ch + ('a' - 'A'))
|
||||
: ch;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user