| 335 | } |
| 336 | |
| 337 | std::string str_replace_all(std::string str, const std::string& from, const std::string& to) |
| 338 | { |
| 339 | size_t start_pos = 0; |
| 340 | while ((start_pos = str.find(from, start_pos)) != std::string::npos) |
| 341 | { |
| 342 | str.replace(start_pos, from.length(), to); |
| 343 | start_pos += to.length(); |
| 344 | } |
| 345 | return str; |
| 346 | } |
| 347 | |
| 348 | /*******************************/ |
| 349 |