您的位置:首页 > 编程语言 > C语言/C++

Convert a String In C++ To Upper or Lower Case

2013-01-08 18:44 671 查看
#include <algorithm>
#include <string>

std::string str = "Hello World";
std::transform(str.begin(), str.end(),str.begin(), ::toupper);
#include <algorithm>#include <string>std::string data = "Abc";std::transform(data.begin(), data.end(), data.begin(), ::tolower);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: