| 36 | } |
| 37 | |
| 38 | inline std::string to_lower(const std::string &s) { |
| 39 | std::string lower; |
| 40 | lower.reserve(s.size()); |
| 41 | std::transform(s.begin(), s.end(), std::back_inserter(lower), ::tolower); |
| 42 | return lower; |
| 43 | } |
| 44 | |
| 45 | inline bool iequals(const std::string &a, const std::string &b) { |
| 46 | return to_lower(a) == to_lower(b); |