#include <string> #include <algorithm> void test() { std::string strA="QQQQWWWqqqqqqwwwwwww; //std::string的大小写转换 transform(strA.begin(), strA.end(), strA.begin(), ::toupper); transform(strA.begin(), strA.end(), strA.begin(), ::tolower); }
jingdian1956 2013-12-07 10:07 原文
#include <string> #include <algorithm> void test() { std::string strA="QQQQWWWqqqqqqwwwwwww; //std::string的大小写转换 transform(strA.begin(), strA.end(), strA.begin(), ::toupper); transform(strA.begin(), strA.end(), strA.begin(), ::tolower); }