Re: strnicmp in stl string class?

From: John Harrison (john_andronicus_at_hotmail.com)
Date: 09/21/04


Date: Tue, 21 Sep 2004 06:51:38 +0100


"JustSomeGuy" <nope@nottelling.com> wrote in message
news:TiO3d.462745$M95.157514@pd7tw1no...
> What is the equivilent of strnicmp in the stl string class...
> ie i want to do a case independant comparison of the first n characters.
>

There is no case independent comparison in the STL string class. Neither is
strnicmp or any other similar function part of standard C++.

If you want to do case independent comparison you will have to do it
yourself. You could use the character functions toupper and tolower for this
purpose.

john