HomeSite: http://www.nutstech.com
#include <string>
#include <algorithm>
std::string str="This is a test string, OK";
remove(str.begin(), str.end(),','); //delete ',' in str
replace(str.begin(), str.end(),',','-'); //replace ',' with '-'
发表评论
没有评论:
发表评论