| Java | C++ | Python |
|---|---|---|
Here is a quick way to do string splitting in c++ using STL. Then you don't need to use find that can get you astray.
vector<string> mysplit(string&s, char delimiter){
vector<string> res;
istringstream ss(s);
string hold;
while(getline(ss,hold,delimiter)){
res.push_back(move(hold));
}
return res;
}