fork download
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <cctype>
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. char test[] = "TEST";
  9. cout << "Before: " << test << endl;
  10. transform(test, test+4, test, [](char ch){ return tolower(ch); });
  11. cout << "After: " << test << endl;
  12. return 0;
  13. }
Success #stdin #stdout 0s 4504KB
stdin
Standard input is empty
stdout
Before: TEST
After: test