c++ std::string转大、小写
#include <iostream>
#include <algorithm>
int main()
{
std::string src = "HELLO, WORLD!";
std::string dst;
std::transform(src.begin(), src.end(), std::back_inserter(dst), ::tolower);
std::transform(src.begin(), src.end(), src.begin(), ::tolower);
}
posted on 2022-10-19 15:42 OctoberKey 阅读(170) 评论(0) 收藏 举报
浙公网安备 33010602011771号