There is a code that translates upper case to lower case.
#include <algorithm> #include <iostream> #include <string> #include <ctype.h> int main() { std::string text; std::cout << "Type text(QWERTY): "; std:: getline(std::cin, text); std::cout<<text << " - " ; std::transform(text.begin(), text.end(), text.begin(), tolower); std::cout << text; return 0; }
But, if Cyrillic is entered, then Cyrillic is not replaced by lower case. How to make a check whether there is a Cyrillic alphabet or which replacement method to use, so that it would not be necessary to use char and char arrays. Work only with string
std::wstringwill help you - NewView