MCPcopy Create free account
hub / github.com/ARM-software/armnn / StringReplaceAll

Function StringReplaceAll

include/armnn/utility/StringUtils.hpp:109–119  ·  view source on GitHub ↗

Iterates over a given str and replaces all instance of substring oldStr with newStr

Source from the content-addressed store, hash-verified

107/// Iterates over a given str and replaces all instance of substring oldStr with newStr
108///
109inline void StringReplaceAll(std::string& str,
110 const std::string& oldStr,
111 const std::string& newStr)
112{
113 std::string::size_type pos = 0u;
114 while ((pos = str.find(oldStr, pos)) != std::string::npos)
115 {
116 str.replace(pos, oldStr.length(), newStr);
117 pos += newStr.length();
118 }
119}
120
121///
122/// Converts a string to bool.

Callers 1

EscapeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected