| 37 | } |
| 38 | |
| 39 | static int stringCompare(const string &str1, const string &str2) { |
| 40 | int diff = 0; |
| 41 | size_t size = std::min(str1.size(), str2.size()); |
| 42 | for (size_t idx = 0; idx < size && diff == 0; ++idx) { |
| 43 | diff = charDiff(str1[idx], str2[idx]); |
| 44 | } |
| 45 | if (diff != 0) return diff; |
| 46 | |
| 47 | if (str2.length() == str1.length()) return 0; |
| 48 | if (str2.length() > str1.length()) return 1; |
| 49 | return -1; |
| 50 | } |
| 51 | |
| 52 | bool StringUnsensitiveComp::operator()(const std::string &str1, |
| 53 | const std::string &str2) const { |
no test coverage detected