| 297 | } |
| 298 | |
| 299 | bool WriteSingleQuotedString(ostream_wrapper& out, const std::string& str) { |
| 300 | out << "'"; |
| 301 | int codePoint; |
| 302 | for (std::string::const_iterator i = str.begin(); |
| 303 | GetNextCodePointAndAdvance(codePoint, i, str.end());) { |
| 304 | if (codePoint == '\n') { |
| 305 | return false; // We can't handle a new line and the attendant indentation |
| 306 | // yet |
| 307 | } |
| 308 | |
| 309 | if (codePoint == '\'') { |
| 310 | out << "''"; |
| 311 | } else { |
| 312 | WriteCodePoint(out, codePoint); |
| 313 | } |
| 314 | } |
| 315 | out << "'"; |
| 316 | return true; |
| 317 | } |
| 318 | |
| 319 | bool WriteDoubleQuotedString(ostream_wrapper& out, const std::string& str, |
| 320 | StringEscaping::value stringEscaping) { |
no test coverage detected