| 112 | if (text == "false") { |
| 113 | return false; |
| 114 | } |
| 115 | } |
| 116 | throw std::runtime_error("workflow field must be a bool: " + key); |
| 117 | } |
| 118 | |
| 119 | std::string replace_all(std::string text, const std::string & from, const std::string & to) { |
| 120 | if (from.empty()) { |
| 121 | return text; |
| 122 | } |
| 123 | size_t pos = 0; |
| 124 | while ((pos = text.find(from, pos)) != std::string::npos) { |
| 125 | text.replace(pos, from.size(), to); |
| 126 | pos += to.size(); |
| 127 | } |
no test coverage detected