c++ split 구현


c++ split 구현

문자열 최악인 c++ 맨날 split 기능 필요해서 블로그에 남겨놓는다 vector<string> split(string input, string delimiter) { vector<string> ret; long long pos = 0; string token = ""; while ((pos = input.find(delimiter)) != string::npos) { token = input.substr(0, pos); ret.push_back(token); input.erase(0, pos + delimiter.length()); } ret.push_back(input); return ret; }...

c++ split 구현에 대한 요약내용입니다.

자세한 내용은 아래에 원문링크를 확인해주시기 바랍니다.


#cpp

원문링크 : c++ split 구현