📅  最后修改于: 2022-03-11 14:44:48.006000             🧑  作者: Mango
std::vector &split(const std::string &s, char delim, std::vector &elems) {
std::stringstream ss(s);
std::string item;
while(std::getline(ss, item, delim)) {
elems.push_back(item);
}
return elems;
}