I have two postcodes char* that I want to compare, ignoring case. Is there a function to do this?
char*
Or do I have to loop through each use the tolower func
Simple solution:
int str_case_ins_cmp(const char* a, const char* b) { int rc; while (1) { rc = tolower((unsigned char)*a) - tolower((unsigned char)*b); if (rc || !*a) { break; } ++a; ++b; } return rc; }