首页 > 其他 > 详细

字符串中的TOUPPER函数

时间:2019-07-02 09:52:40      阅读:146      评论:0      收藏:0      [点我收藏+]
std::string& str_toupper(std::string& s) {
    std::transform(s.begin(), s.end(), s.begin(), 
                   [](unsigned char c){ return ::toupper(c); } // correct
                  );
    return s;
}

 

字符串中的TOUPPER函数

原文:https://www.cnblogs.com/eaglexmw/p/11118543.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!