1

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.

Paul R
  • 208,748
  • 37
  • 389
  • 560

1 Answers1

3

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;
}
Ari Singh
  • 1,228
  • 7
  • 12