MCPcopy Create free account
hub / github.com/dirkvdb/ffmpegthumbnailer / tokenize

Method tokenize

libffmpegthumbnailer/stringoperations.cpp:55–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55vector<string> StringOperations::tokenize(const string& str, const string& delimiter)
56{
57 vector<string> tokens;
58 string tempString = str;
59 size_t pos = 0;
60
61 while ((pos = tempString.find(delimiter)) != string::npos) {
62 tokens.push_back(tempString.substr(0, pos));
63 tempString.erase(0, pos + delimiter.size());
64 }
65 tokens.push_back(tempString);
66
67 return tokens;
68}
69
70}

Callers

nothing calls this directly

Calls 2

findMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected