 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Flzw Guest
|
Posted: Thu Jan 27, 2005 7:11 pm Post subject: string::compare |
|
|
I've been trying to use std::string::compare and apparently it is case
sensitive, I searched the net but I can't find a way for it not to take case
into account, the solution I have for now is using stricmp with s1.c_str()
and s2.c_str() but I assume there is a better way... Thanks.
|
|
| Back to top |
|
 |
Victor Bazarov Guest
|
Posted: Thu Jan 27, 2005 7:12 pm Post subject: Re: string::compare |
|
|
Flzw wrote:
| Quote: | I've been trying to use std::string::compare and apparently it is case
sensitive, I searched the net but I can't find a way for it not to take case
into account, [...]
|
Have you tried "case insensitive string comparison" on Google?
|
|
| Back to top |
|
 |
Jeff Flinn Guest
|
Posted: Thu Jan 27, 2005 7:18 pm Post subject: Re: string::compare |
|
|
Flzw wrote:
| Quote: | I've been trying to use std::string::compare and apparently it is case
sensitive, I searched the net but I can't find a way for it not to
take case into account, the solution I have for now is using stricmp
with s1.c_str() and s2.c_str() but I assume there is a better way...
Thanks.
|
In your case, see http://www.boost.org/doc/html/iequals.html
From another thread:
Matthias wrote:
| Quote: | Hello,
I am missing certain functionality of std::string, so I am currently
writing some helper functions which operate on strings. On of them is
|
Have you see Pavel Droba's string algorithm library at boost? See
http://www.boost.org/doc/html/string_algo/quickref.html#id576916.
This offers an extensive set of well thought out algorithms. Boost is
extensively tested for portability across many platforms.
Jeff
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|