LCase and UCase in C/C++

Started by
1 comment, last by Daishim 22 years, 9 months ago
Does C/C++ have lowercase or uppercase function like VB, or something similar that will set all characters in a character array/string to lowercase or uppercase?

I know only that which I know, but I do not know what I know.
Advertisement
There are no built-in functions for converting an entire string, but it''s pretty easy to make one yourself using the toupper() or tolower() functions.

~~~~~~~~~~
Martee
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
Someone once mentioned something like:

std::transform(theString.begin(), theString.end(), toupper);

But I find this doesn''t work under GCC because the string is composed of ''char'' and toupper returns an ''int''. Maybe there is a way around this though.

This topic is closed to new replies.

Advertisement