Both functions do the exact same thing (as long as you stick to comparing plain ASCII strings).
The problem is, neither is part of the ANSI C standard, so you can't be sure any of these will be available for a given compiler.
You can have yet other names for the same functionality. _strcmpi()
for instance.
There is no standard case-insensitive comparison primitive in C/C++, so each compiler provides its own version with varying names.
The best "standard" variant would be the ISO C++ _stricmp
, but I would not bet every compiler on the planet currently supports it.
The reason behind it is that case sensitivity is not as trivial a problem as it might seem, what with all the diacritics of various languages and the extended character encodings.
While plain ASCII string will always be compared the same way, you can expect differences in implementation when trying to compare UTF16 strings or other extended character sets.
Judging by this article, some C++ geeks seem to get a big kick rewriting their own version of it too.