+void replaceInName(ObjectPtr theObject, const std::string& theSource, const std::string& theDest)
+{
+ std::string aName = theObject->data()->name();
+ size_t aPos = aName.find(theSource);
+ if (aPos != std::string::npos) {
+ std::string aNewName = aName.substr(0, aPos) + theDest
+ + aName.substr(aPos + theSource.size());
+ theObject->data()->setName(aNewName);
+ }
+}
+