C++ string字符串分割函数
Error Stringsplit(std::string str, char split, std::vector<std::string>& res) { std::istringstream iss(str); // 输入流 std::string token; // 接收缓冲区 while (std::getline(iss, token, split)) // 以split为分隔符 { res.push_back(token); } return ErrNone; }