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.
Asked
Active
Viewed 786 times
1
-
It's pretty trivial to implement this yourself. – Paul R Mar 12 '18 at 17:17
-
I actually study Maths so I'm not that good implementing, that's why I'm asking, if you could help I would really appreciate it. – Arturo Sánchez Palacio Mar 12 '18 at 17:19
-
1[Like these solutions](https://stackoverflow.com/questions/735204/convert-a-string-in-c-to-upper-case). – tadman Mar 12 '18 at 17:20
1 Answers
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