mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-16 07:56:12 +03:00
Speeds up utils::string::toupper function
This commit is contained in:
parent
b3c8e97ff7
commit
ba070c9eaa
@ -140,12 +140,13 @@ std::string tolower(std::string str) {
|
|||||||
|
|
||||||
|
|
||||||
std::string toupper(std::string str) {
|
std::string toupper(std::string str) {
|
||||||
std::locale loc;
|
|
||||||
std::string value;
|
std::string value;
|
||||||
|
value.resize(str.length());
|
||||||
|
|
||||||
for (std::string::size_type i=0; i < str.length(); ++i) {
|
std::transform(str.begin(),
|
||||||
value.assign(value + std::toupper(str[i], loc));
|
str.end(),
|
||||||
}
|
value.begin(),
|
||||||
|
::toupper);
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user