MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / SplitString

Function SplitString

src/tw/dbexplore.cpp:174–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174static void SplitString(const TSTRING& str, TCHAR c, std::vector<TSTRING>& vStrings)
175{
176 vStrings.clear();
177
178 TSTRING::const_iterator i, prev;
179 for (prev = i = str.begin(); i != str.end(); ++i)
180 {
181 if (*i == c)
182 {
183 vStrings.push_back(TSTRING());
184 vStrings.back().assign(prev, i);
185 prev = i + 1;
186 }
187 }
188 if (prev != i)
189 {
190 vStrings.push_back(TSTRING());
191 vStrings.back().assign(prev, i);
192 }
193}
194
195
196///////////////////////////////////////////////////////////////////////////////

Callers 1

ExecuteMethod · 0.85

Calls 3

beginMethod · 0.80
endMethod · 0.80
assignMethod · 0.80

Tested by

no test coverage detected