|
-
February 7th, 2005, 10:35 PM
#1
comparing std::string objects - no case
Hi everyone. A quick STL question here: is there any function/method defined for case-insencitive comparesent of two std::string objects and if not - what would be the C++ way to convert std::string content to upper/lower case.
I am very well aware of strupr, _tcsupr and other C fucntions that would allow me to do this but what would be the C++ way?
Thanks a lot.
-
February 7th, 2005, 10:41 PM
#2
Re: comparing std::string objects - no case
Never mind folks. I found it:
Code:
std::transform(str.begin(), str.end(), str.begin(), toupper);
If you have other suggestions please let me know. Thanks again.
-
February 7th, 2005, 11:34 PM
#3
Re: comparing std::string objects - no case
-
February 8th, 2005, 08:45 AM
#4
Re: comparing std::string objects - no case
-
February 8th, 2005, 12:20 PM
#5
Re: comparing std::string objects - no case
Nice collection of utilities Philip
Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
Supports C++ and VB out of the box, but can be configured for other languages.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|