Advertisement
Guest User

Untitled

a guest
Mar 20th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include "string"
  2.  
  3. void lowerCase(std::string &a);
  4.  
  5. int main()
  6. {
  7. setlocale(LC_ALL, "Russian");
  8. std::string a = "Привет, МИР ЁЁЁЁЁЁ!";
  9. lowerCase(a);
  10. printf(a.c_str());
  11. return 0;
  12. }
  13.  
  14. void lowerCase(std::string &a) {
  15. for (unsigned long i = 0; i < a.size(); i = i)
  16. if (((a[i] <= 0xFFFFFFFFFFFFFFDF) && (a[i] >= 0xFFFFFFFFFFFFFFC0)))
  17. a[i++] += (char)0xFFFFFFFFFFFFFF20;
  18. else
  19. a[i] = a[i] == 0xFFFFFFFFFFFFFFA8 ? 0xFFFFFFFFFFFFFFB8 : a[i++];
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement