#include <algorithm>
#include <iostream>
#include <string>
bool equalsIgnoreCase(const std::string& str1, const std::string& str2) {
std::string str1Lower = str1;
std::string str2Lower = str2;
std::transform(str1Lower.begin(), str1Lower.end(), str1Lower.begin(), ::tolower);
std::transform(str2Lower.begin(), str2Lower.end(), str2Lower.begin(), ::tolower);
return str1Lower == str2Lower;
}
int main() {
std::string str1 = "profession: c++ programmer";
std::string str2 = "Profession: C++ PROGRAMMER";
bool equals = equalsIgnoreCase(str1, str2);
std::cout << (equals ? "true" : "false") << std::endl;
}
/*
run:
true
*/