count函数 转化函数的格式

所需头文件

#include <algorithm>

  string str="how are you"

    transform(str.begin(),str.end(),str.begin(),::toupper); toupper 全转大写,tolower全转小写。

count(news.begin(),news.end(),'需要计数的字符');

原文地址:https://www.cnblogs.com/thebest/p/9847879.html