How to make strcmp/strncmp case-insensitive in C/C++
To make strcmp case-insensitive, use strcasecmp from #include <strings.h>
. strcasecmpcan be used in exactly the same way as strcmp.
To make strncmp case-insensitive, use strncasecmp from #include <strings.h>
. strncasecmp can be used in exactly the same way as strncmp.
Note that both of these will not deal with unicode characters correctly, but will work just fine in most applications.