Skip to content

Instantly share code, notes, and snippets.

@satojkovic
Last active December 18, 2015 04:49
Show Gist options
  • Save satojkovic/5728042 to your computer and use it in GitHub Desktop.
Save satojkovic/5728042 to your computer and use it in GitHub Desktop.
#include <algorithm>
#include <string>
#include <iostream>
using namespace std;
int main()
{
string s1("UNIQLO");
string s2("apple");
cout << "before(s1): " << s1 << endl;
cout << "before(s2): " << s2 << endl;
transform(s1.begin(), s1.end(), s1.begin(), static_cast<int (*)(int)>(tolower));
cout << "tolower(s1): " << s1 << endl;
transform(s2.begin(), s2.end(), s2.begin(), static_cast<int (*)(int)>(toupper));
cout << "toupper(s2): " << s2 << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment