| 474 | } |
| 475 | |
| 476 | void replaceAll(std::string& stringText, const char charToChange, const char charToAdd) |
| 477 | { |
| 478 | try |
| 479 | { |
| 480 | // replace all charToChange to charToAdd |
| 481 | std::replace( stringText.begin(), stringText.end(), charToChange, charToAdd); |
| 482 | } |
| 483 | catch (const std::exception& e) |
| 484 | { |
| 485 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 486 | } |
| 487 | } |
| 488 | } |