Re: [mod-security-users] string compare
Brought to you by:
victorhora,
zimmerletw
|
From: <877...@qq...> - 2021-07-02 15:22:42
|
i got it. bb always is uppercase .
------------------ Original ------------------
From: "mod-security-users" <mod...@li...>;
Date: Fri, Jul 2, 2021 06:02 PM
To: "mod-security-users"<mod...@li...>;
Cc: "huiming"<877...@qq...>;
Subject: [mod-security-users] string compare
hi all,
Who can help me understand why the highlighted is not toupper(aa) == toupper(bb) or tolower(aa)==tolower(bb) ?
in file ModSecurity/src/variables/variable.h
class VariableMonkeyResolution {
public:
VariableMonkeyResolution () { }
static inline bool comp(const std::string &a, const std::string &b) {
return a.size() == b.size()
&& std::equal(a.begin(), a.end(), b.begin(),
[](char aa, char bb) {
return toupper(aa) == bb;
});
}
thanks
huiming |