字符串的大小写转换
程序清单16.7
#include<string>
#include<algorithm>
#include<iostream>
using namespace std;
int main(){
string s("hello");
//transform(数据起始迭代器, 数据结束迭代器, 写入位置的迭代器, 函数)
//::toupper
transform( s.begin(), s.end(), s.begin(), ::toupper);
cout << s << endl;
//::tolower
transform( s.begin(), s.end(), s.begin(), ::tolower);
cout << s << endl;
}