00001 #include "Kernel/STDetSwitch.h" 00002 00003 void STDetSwitch::flip(std::string aType, std::string& aString){ 00004 00005 std::string::size_type iChar = 0; 00006 std::string oldType; 00007 aType == "TT" ? oldType = "IT" : oldType = "TT"; 00008 00009 while ((iChar = aString.find(oldType)) != std::string::npos) { 00010 aString.replace(iChar, 2, aType); 00011 } 00012 00013 }