版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_35747066/article/details/89001655
string字符串处理
1.将一个string类型的对象s中按照分隔符ch进行分割,将子字符串放入到vector<string>中的模块
vector<string> Vec;
int StartIndex = 0;int EndIndex = 0;
while(EndIndex != -1){
EndIndex = Input.find(";",StartIndex);
Vec.push_back(Input.substr(StartIndex,EndIndex - StartIndex));
StartIndex = EndIndex + 1;
}