13 lines
312 B
C++
13 lines
312 B
C++
#include <string>
|
|
|
|
char toLowerCase(const char c) {
|
|
return c | 32;
|
|
}
|
|
|
|
bool equalsIgnoreCase(const std::string &a, const std::string &b) {
|
|
if (a.size() != b.size()) return false;
|
|
for (size_t i = 0; i < a.size(); ++i) {
|
|
if (tolower(a[i]) != tolower(b[i])) return false;
|
|
}
|
|
return true;
|
|
} |