c++cstringstrcmp

strcmpi renamed to _strcmpi?


In MSVC++, there's a function strcmpi for case-insensitive C-string comparisons.

When you try and use it, it goes,

This POSIX function is deprecated beginning in Visual C++ 2005. Use the ISO C++ conformant _stricmp instead.

What I don't see is why does ISO not want MSVC++ to use strcmpi, and why is _stricmp the preferred way, and why would they bother to rename the function, and how is a function beginning with an underscore ISO conformant. I know there must be a reason for all this, and I'm suspecting its because strcmpi is non-standard, and perhaps ISO wants non-standard extensions to begin with an _underscore?


Solution

  • ISO C reserves certain identifiers for future expansion (see here), including anything that starts with "str".