Case insenstive string comparison Yes there is a way to do this in C++ by changing the character traits, but who cares.
| 98 | // Case insenstive string comparison |
| 99 | // Yes there is a way to do this in C++ by changing the character traits, but who cares. |
| 100 | bool strcaseeql(const char *a,const char *b) { return 0==strcasecmp((a),(b)); } |
| 101 | bool strncaseeql(const char *a,const char *b, unsigned n) { return 0==strncasecmp((a),(b),(n)); } |
| 102 | bool strceql(const string a, const string b) { return strcaseeql(a.c_str(),b.c_str()); } |
| 103 |