| 142 | |
| 143 | |
| 144 | string lowerSlaveToAgent(string s) |
| 145 | { |
| 146 | size_t index = 0; |
| 147 | |
| 148 | while (true) { |
| 149 | index = s.find("slave", index); |
| 150 | if (index == std::string::npos) break; |
| 151 | s.replace(index, 5, "agent"); |
| 152 | index += 5; |
| 153 | } |
| 154 | |
| 155 | return s; |
| 156 | } |
| 157 | |
| 158 | |
| 159 | string upperSlaveToAgent(string s) |