Reputation: 11
I'm trying to use a code I found online for a bigger algorithm and Xcode doesn't support this function. I tried using the library curses.h (because conio.h is not defined in Xcode) but I couln't find an equivalent command.
Upvotes: 1
Views: 907
Reputation: 1306
In Xcode there is no built-in function to uppercase a string, but you can easily write one like so:
std::string strToUpper(std::string str)
{
std::transform(str.begin(), str.end(), str.begin(), ::toupper);
return str;
}
Upvotes: 3