标签:color str code article details vector style log ngx
原文链接:https://blog.csdn.net/jirryzhang/article/details/80473032
或:https://www.cnblogs.com/dingxiaoqiang/p/8228390.html
vector<string> split(const string& str, const string& pattern) { vector<string> ret; if(pattern.empty()) return ret; size_t start=0,index=str.find_first_of(pattern,0); while(index!=str.npos) { if(start!=index) ret.push_back(str.substr(start,index-start)); start=index+1; index=str.find_first_of(pattern,start); } if(!str.substr(start).empty()) ret.push_back(str.substr(start)); return ret; }
标签:color str code article details vector style log ngx
原文地址:https://www.cnblogs.com/jixiaohua/p/11875362.html