MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / replace

Function replace

source/MRMesh/MRString.cpp:174–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174std::string replace( std::string target, std::string_view from, std::string_view to )
175{
176 std::string ret;
177 bool first = true;
178 split( target, from, [&]( std::string_view segment )
179 {
180 if ( first )
181 first = false;
182 else
183 ret += to;
184 ret += segment;
185 return false;
186 } );
187 return ret;
188}
189
190void replaceInplace( std::string& target, std::string_view from, std::string_view to )
191{

Callers 6

getSystemLocalesMethod · 0.85
valueToImGuiFormatStringFunction · 0.85
getOSNoSpacesFunction · 0.85
replaceInplaceFunction · 0.85
decompressZip_Function · 0.85
compressZipFunction · 0.85

Calls 1

splitFunction · 0.70

Tested by

no test coverage detected