MCPcopy Create free account
hub / github.com/Derious/cuMPC / format

Function format

dependence/eigen-3.4.0/unsupported/test/openglsupport.cpp:226–236  ·  view source on GitHub ↗

Finds and replaces a set of substrings in a string.

Source from the content-addressed store, hash-verified

224
225// Finds and replaces a set of substrings in a string.
226std::string format(
227 const std::string& str,
228 const std::vector<std::string>& find,
229 const std::vector<std::string>& replace)
230{
231 std::string out = str;
232 for (std::size_t i=0; i<find.size(); ++i) {
233 find_and_replace(out, find[i], replace[i]);
234 }
235 return out;
236}
237
238// GLUT display function that runs test. Must be run within the display loop
239// in order to properly destroy resources.

Callers 1

openglsupport_test_loopFunction · 0.70

Calls 2

find_and_replaceFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected