Lines Matching refs:dest
29 // successful, returns true and appends the escape sequence to |dest|. This
31 bool EscapeSpecialCodePoint(uint32 code_point, std::string* dest) {
37 dest->append("\\b");
40 dest->append("\\f");
43 dest->append("\\n");
46 dest->append("\\r");
49 dest->append("\\t");
52 dest->append("\\\\");
55 dest->append("\\\"");
60 dest->append("\\u003C");
69 bool EscapeJSONStringImpl(const S& str, bool put_in_quotes, std::string* dest) {
73 dest->push_back('"');
86 if (EscapeSpecialCodePoint(code_point, dest))
91 base::StringAppendF(dest, kU16EscapeFormat, code_point);
93 WriteUnicodeCharacter(code_point, dest);
97 dest->push_back('"');
106 std::string* dest) {
107 return EscapeJSONStringImpl(str, put_in_quotes, dest);
112 std::string* dest) {
113 return EscapeJSONStringImpl(str, put_in_quotes, dest);
117 std::string dest;
118 bool ok = EscapeJSONStringImpl(str, true, &dest);
120 return dest;
124 std::string dest;
125 bool ok = EscapeJSONStringImpl(str, true, &dest);
127 return dest;
132 std::string dest;
135 dest.push_back('"');
139 if (EscapeSpecialCodePoint(c, &dest))
143 base::StringAppendF(&dest, kU16EscapeFormat, c);
145 dest.push_back(*it);
149 dest.push_back('"');
151 return dest;