Q writes quoted json-safe s to w.
(s string)
| 162 | |
| 163 | // Q writes quoted json-safe s to w. |
| 164 | func (w *QWriter) Q(s string) { |
| 165 | bb, ok := w.w.(*ByteBuffer) |
| 166 | if ok { |
| 167 | bb.B = AppendJSONString(bb.B, s, true) |
| 168 | } else { |
| 169 | w.b = AppendJSONString(w.b[:0], s, true) |
| 170 | w.Write(w.b) |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | var strQuote = []byte(`"`) |
| 175 |