| 3142 | // ------------------------------------------------------------------------------------ |
| 3143 | |
| 3144 | struct case_insensitive_compare |
| 3145 | { |
| 3146 | bool operator() ( |
| 3147 | const std::string& a, |
| 3148 | const std::string& b |
| 3149 | ) const |
| 3150 | { |
| 3151 | std::string::size_type i, size; |
| 3152 | size = std::min(a.size(),b.size()); |
| 3153 | for (i = 0; i < size; ++i) |
| 3154 | { |
| 3155 | if (std::tolower(static_cast<unsigned char>(a[i])) < std::tolower(static_cast<unsigned char>(b[i]))) |
| 3156 | return true; |
| 3157 | else if (std::tolower(static_cast<unsigned char>(a[i])) > std::tolower(static_cast<unsigned char>(b[i]))) |
| 3158 | return false; |
| 3159 | } |
| 3160 | if (a.size() < b.size()) |
| 3161 | return true; |
| 3162 | else |
| 3163 | return false; |
| 3164 | } |
| 3165 | }; |
| 3166 | |
| 3167 | // ------------------------------------------------------------------------------------ |
| 3168 |
no outgoing calls
no test coverage detected