std::string转化大小写(C++)

it2022-05-05  79

#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); }

 

转载于:https://www.cnblogs.com/jingdian1956/p/3462475.html


最新回复(0)