Case Insensitive String comp in C
问题 I have two postcodes char* that I want to compare, ignoring case. Is there a function to do this? Or do I have to loop through each use the tolower function and then do the comparison? Any idea how this function will react with numbers in the string Thanks 回答1: There is no function that does this in the C standard. Unix systems that comply with POSIX are required to have strcasecmp in the header strings.h ; Microsoft systems have stricmp . To be on the portable side, write your own: int