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.
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.
Re: comparing std::string objects - no case
Re: comparing std::string objects - no case
Re: comparing std::string objects - no case
Nice collection of utilities Philip :)