| 103 | typename alloc |
| 104 | > |
| 105 | bool strings_equal_ignore_case ( |
| 106 | const std::basic_string<char,traits,alloc>& str1, |
| 107 | const std::basic_string<char,traits,alloc>& str2 |
| 108 | ) |
| 109 | { |
| 110 | if (str1.size() != str2.size()) |
| 111 | return false; |
| 112 | |
| 113 | for (typename std::basic_string<char,traits,alloc>::size_type i = 0; i < str1.size(); ++i) |
| 114 | { |
| 115 | if (std::tolower(str1[i]) != std::tolower(str2[i])) |
| 116 | return false; |
| 117 | } |
| 118 | |
| 119 | return true; |
| 120 | } |
| 121 | |
| 122 | template < |
| 123 | typename traits, |