MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / operator()

Method operator()

lib/mdflib/mdfviewer/src/util/stringutil.cpp:4–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2
3namespace util::string {
4bool IgnoreCase::operator()(const std::string &s1, const std::string &s2) const {
5 std::string s1_lower(s1);
6 std::string s2_lower(s2);
7 std::transform(s1.begin(), s1.end(), s1_lower.begin(), ::tolower);
8 std::transform(s2.begin(), s2.end(), s2_lower.begin(), ::tolower);
9 return std::lexicographical_compare(s1_lower.begin(), s1_lower.end(), s2_lower.begin(), s2_lower.end());
10}
11
12bool IgnoreCase::operator()(const std::wstring &s1, const std::wstring &s2) const {
13 std::wstring s1_lower(s1);

Callers

nothing calls this directly

Calls 2

beginMethod · 0.80
transformFunction · 0.50

Tested by

no test coverage detected