strnicmp in stl string class?

J

JustSomeGuy

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.
 
J

John Harrison

JustSomeGuy said:
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
 
D

David Fisher

JustSomeGuy said:
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.

See the recent thread in this news group:

From: "JKop"
Subject: "Compare without regard to case"
Posted Wednesday, 15 September 2004 10:02 PM

David Fisher
Sydney, Australia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top