MCPcopy Create free account
hub / github.com/OpenMW/openmw / split

Function split

components/misc/strings/algorithm.hpp:174–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172
173 template <class Container>
174 void split(std::string_view str, Container& cont, std::string_view delims = " ")
175 {
176 std::size_t current = str.find_first_of(delims);
177 std::size_t previous = 0;
178 while (current != std::string::npos)
179 {
180 cont.emplace_back(str.substr(previous, current - previous));
181 previous = current + 1;
182 current = str.find_first_of(delims, previous);
183 }
184 cont.emplace_back(str.substr(previous, current - previous));
185 }
186
187 inline void replaceLast(std::string& str, std::string_view substr, std::string_view with)
188 {

Callers 9

parseForeachDirectiveFunction · 0.85
getColourMethod · 0.85
extractTextKeysFunction · 0.85
getStringArrayMethod · 0.85
getVector2Method · 0.85
getVector3Method · 0.85
initUtilPackageFunction · 0.85
handleTextKeyMethod · 0.85
onRetrieveTagMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected