Try strcasecmp()
. Here's the manual page for it. It is conforming to 4.4BSD and POSIX.1-2001.
stricmp
is neither POSIX nor ANSI, so it doesn't really matter if strcmp
is allowed, if your compiler or standard library is strictly adhering to POSIX or ANSI standard library functions (as is probably the case with the GCC suite).
Add a define for it to overwrite stricmp with strcasecmp on the platforms you are looking for.
#ifdef _IPHONE <- your platform define here
#define stricmp strcasecmp
#define strnicmp strncasecmp
#endif
Then you can just use stricmp always.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With