字符串分割
std::vector<std::string> split_string(const std::string& str, const std::string& delim) {
std::vector<std::string> res;
std::string tmp;
for (int i = 0; i < str.size(); i++) {
if (delim.find(str[i]) == std::string::npos) {
tmp.push_back(str[i]);
} else {
res.push_back(tmp);
tmp.clear();
}
}
res.push_back(tmp);
return res;
}
