MCPcopy Create free account
hub / github.com/EmbeddedRPC/erpc / replaceAll

Function replaceAll

erpcgen/src/cpptemplate/cpptempl.cpp:42–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40namespace cpptempl {
41
42void replaceAll(std::string &str, const std::string &from, const std::string &to)
43{
44 size_t start_pos = 0;
45 while ((start_pos = str.find(from, start_pos)) != std::string::npos)
46 {
47 str.replace(start_pos, from.length(), to);
48 start_pos += to.length();
49 }
50}
51
52namespace impl {
53// Types of tokens in control statements.

Callers 3

getDescriptionMethod · 0.85
dumpMethod · 0.85
addSpacesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected