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

Similar Threads

Sorting an STL map 1
Problem Splitting Text String 2
stl in c++ 2
Converting an Array to a String in JavaScript 7
STL bitset class slow.. 58
c++ stl 37
STL headers 0
STL Container? 4

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top