Is there anyway you can switch the caps lock to fix the text in the string? I've came up with something here, but are there any hints that could help me out?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include<iostream>
#include<string>
usingnamespace std;
int main( )
{
string s ("cAPS lOCK iS cURRENTLY oN!");
while (s.find("upper-case") != string::npos)
s.replace(s.find("upper-case"), 3, "lower-case");
while (s.find("lower-case") != string::npos)
s.replace(s.find("lower-case"), 3, "upper-case");
cout << s << endl;
return 0;
}