MCPcopy Create free account
hub / github.com/Kitware/VTK / FindAndReplaceInString

Method FindAndReplaceInString

Rendering/Matplotlib/vtkMatplotlibMathTextUtilities.cxx:880–889  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

878
879//------------------------------------------------------------------------------
880void vtkMatplotlibMathTextUtilities::FindAndReplaceInString(
881 std::string& str, const std::string& strToFind, const std::string& replacementStr)
882{
883 size_t start_pos = 0;
884 while ((start_pos = str.find(strToFind, start_pos)) != std::string::npos)
885 {
886 str.replace(start_pos, strToFind.length(), replacementStr);
887 start_pos += replacementStr.length();
888 }
889}
890
891//------------------------------------------------------------------------------
892struct TextColors

Callers 1

ParseStringMethod · 0.95

Calls 2

findMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected