On Dec 17, 12:29 pm, Michal
> Hallo
> I looked through ANSI/ISO C++ standard string, and I did not find any
> function from string class that would do so. Did I overlooked
> something or it is so?
Here's the STL-ish way.
//////
#include
#include
#include
int my_toupper(int c)
{
return toupper(c);
}
int
main(int argc, char **argv)
{
using namespace std;
string s = "hello world";
transform(s.begin(), s.end(), s.begin(), my_toupper);
}
////
You have to create my_toupper (or use a cast) due to a
C++ wart.
Sean