equal
deleted
inserted
replaced
80 /// |
80 /// |
81 /// Writes a quoted string to the given stream. |
81 /// Writes a quoted string to the given stream. |
82 void write(std::ostream& os, const std::string& value) { |
82 void write(std::ostream& os, const std::string& value) { |
83 os << "\""; |
83 os << "\""; |
84 if (escaped) { |
84 if (escaped) { |
85 ostringstream ls; |
85 std::ostringstream ls; |
86 for (int i = 0; i < (int)value.size(); ++i) { |
86 for (int i = 0; i < (int)value.size(); ++i) { |
87 writeEscape(ls, value[i]); |
87 writeEscape(ls, value[i]); |
88 } |
88 } |
89 os << ls.str(); |
89 os << ls.str(); |
90 } else { |
90 } else { |
130 case '\v': |
130 case '\v': |
131 os << "\\v"; |
131 os << "\\v"; |
132 return; |
132 return; |
133 default: |
133 default: |
134 if (c < 0x20) { |
134 if (c < 0x20) { |
135 os << '\\' << oct << (int)c; |
135 os << '\\' << std::oct << (int)c; |
136 } else { |
136 } else { |
137 os << c; |
137 os << c; |
138 } |
138 } |
139 return; |
139 return; |
140 } |
140 } |