code snippet
按格式拆分string
void split(const std::string &s, std::vector<std::string> &sv,
const char *delim = " ") {
sv.clear();
char *buffer = new char[s.size() + 1];
buffer[s.size()] = '\0';
std::copy(s.begin(), s.end(), buffer);
char *p = std::st
原创
2020-07-03 10:26:03 ·
124 阅读 ·
0 评论