20 #ifndef JSONLOADER_INSENSITIVE_MAP_H_
21 #define JSONLOADER_INSENSITIVE_MAP_H_
25 #include <unordered_map>
30 bool operator()(
const std::string &rhs,
const std::string &lhs)
const {
31 if (rhs.size() != lhs.size())
33 for (std::string::size_type i = 0; i < rhs.size(); i++) {
34 if (std::tolower(rhs[i]) != std::tolower(lhs[i]))
44 for (std::string::size_type i = 0; i < s_cpy.size(); i++) {
45 s_cpy[i] = std::tolower(s_cpy[i]);
47 return std::hash<std::string>()(s_cpy);
55 std::unordered_map<std::string, V,
60 #endif // JSONLOADER_INSENSITIVE_MAP_H_