-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
void split(vector &ret, const string& s, char delimiter=' ')
{
ret.clear();
for(auto itStart = s.begin(), itDelim = itStart, itEnd = s.end(); itStart < itEnd; itStart = itDelim + 1)
{
itDelim = find(itStart, itEnd, delimiter);
ret.emplace_back(string(itStart, itDelim));
}
}
itDelim = find(itStart, itEnd, delimiter);
if at last , itDelim == itEnd
crash in itStart = itDelim + 1;
Metadata
Metadata
Assignees
Labels
No labels