Utility functions for case insensitive string compare
| 31 | |
| 32 | // Utility functions for case insensitive string compare |
| 33 | static int charDiff(char c1, char c2) { |
| 34 | if (tolower(c1) < tolower(c2)) return -1; |
| 35 | if (tolower(c1) == tolower(c2)) return 0; |
| 36 | return 1; |
| 37 | } |
| 38 | |
| 39 | static int stringCompare(const string &str1, const string &str2) { |
| 40 | int diff = 0; |