c/c++实现字符串分隔split

1、用c++ 的find + substr实现split(这种只能处理一种字符串分隔符) vector<string> split(const string& s, const string& sep) { vector<string> v; string::size_type pos1, pos2; pos2 = s.find(sep); pos1 = 0;
相关文章
相关标签/搜索