| 606 | } |
| 607 | |
| 608 | static std::string escapeString(const std::string &str) |
| 609 | { |
| 610 | std::ostringstream ostr; |
| 611 | ostr << '\"'; |
| 612 | for (std::size_t i = 1U; i < str.size() - 1; ++i) { |
| 613 | const char c = str[i]; |
| 614 | if (c == '\\' || c == '\"' || c == '\'') |
| 615 | ostr << '\\'; |
| 616 | ostr << c; |
| 617 | } |
| 618 | ostr << '\"'; |
| 619 | return ostr.str(); |
| 620 | } |
| 621 | |
| 622 | static void portabilityBackslash(simplecpp::OutputList *outputList, const simplecpp::Location &location) |
| 623 | { |
no test coverage detected