| 316 | } |
| 317 | |
| 318 | inline std::string |
| 319 | stringReplaceAll(std::string &str, const std::string &from, const std::string &to) { |
| 320 | size_t start_pos = 0; |
| 321 | while ((start_pos = str.find(from, start_pos)) != std::string::npos) { |
| 322 | str.replace(start_pos, from.length(), to); |
| 323 | start_pos += to.length(); |
| 324 | } |
| 325 | return str; |
| 326 | } |
| 327 | |
| 328 | inline std::string getTimeFormatStr() { |
| 329 | time_t now = time(nullptr); |
no test coverage detected