| 236 | } |
| 237 | |
| 238 | std::string UnescapeOptionString(const std::string& escaped_string) { |
| 239 | bool escaped = false; |
| 240 | std::string output; |
| 241 | |
| 242 | for (auto c : escaped_string) { |
| 243 | if (escaped) { |
| 244 | output += UnescapeChar(c); |
| 245 | escaped = false; |
| 246 | } else { |
| 247 | if (c == '\\') { |
| 248 | escaped = true; |
| 249 | continue; |
| 250 | } |
| 251 | output += c; |
| 252 | } |
| 253 | } |
| 254 | return output; |
| 255 | } |
| 256 | |
| 257 | std::string trim(const std::string& str) { |
| 258 | if (str.empty()) return std::string(); |