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;
相關文章
相關標籤/搜索