Prints a wchar_t c as if it's part of a string literal, escaping it when necessary; returns how c was formatted.
| 11297 | // Prints a wchar_t c as if it's part of a string literal, escaping it when |
| 11298 | // necessary; returns how c was formatted. |
| 11299 | static CharFormat PrintAsStringLiteralTo(wchar_t c, ostream* os) { |
| 11300 | switch (c) { |
| 11301 | case L'\'': |
| 11302 | *os << "'"; |
| 11303 | return kAsIs; |
| 11304 | case L'"': |
| 11305 | *os << "\\\""; |
| 11306 | return kSpecialEscape; |
| 11307 | default: |
| 11308 | return PrintAsCharLiteralTo<wchar_t>(c, os); |
| 11309 | } |
| 11310 | } |
| 11311 | |
| 11312 | // Prints a char c as if it's part of a string literal, escaping it when |
| 11313 | // necessary; returns how c was formatted. |
no outgoing calls
no test coverage detected