strcmpi renamed to _strcmpi?

bobobobo picture bobobobo · Dec 27, 2009 · Viewed 11.1k times · Source

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?

Answer

Marcelo Cantos picture Marcelo Cantos · Dec 27, 2009

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