I am currently trying to split a string and store it into a vector
.
For example,
std::string argData = "1:/path/to/file, 3:/path/to/differentfile, 4:/path/to/anotherfile";
vector<string> v = Util::split(argData, ",");
will return ["1:/path/to/file", "3:/path/to/differentfile", "4:/path/to/anotherfile"] in v
.
What I would like to do is:
for each string in vector
position = string.find(':')
How would I do this in C++? I do not have access to C++11 for auto.