문자열 split
jjuiddong
void htmlextract::Tokenize(const string& src, const string& delimiters, vector<string>& tokens) { string::size_type lastPos = src.find_first_not_of(delimiters, 0); // Skip delimiters at beginning. string::size_type pos = src.find_first_of(delimiters, lastPos); // Find first "non-delimiter". while (string::npos != pos || string::npos != lastPos) { tokens.push_back(src.substr(lastPos, pos - lastPos)); // Found a token, add it to the vector. lastPos = src.find_first_not_of(delimiters, pos); // Skip delimiters. Note the "not_of" pos = src.find_first_of(delimiters, lastPos); // Find next "non-delimiter" } }