Lines Matching full:dest
34 // successful, returns true and appends the escape sequence to |dest|. This
36 bool EscapeSpecialCodePoint(base_icu::UChar32 code_point, std::string* dest) { in EscapeSpecialCodePoint() argument
42 dest->append("\\b"); in EscapeSpecialCodePoint()
45 dest->append("\\f"); in EscapeSpecialCodePoint()
48 dest->append("\\n"); in EscapeSpecialCodePoint()
51 dest->append("\\r"); in EscapeSpecialCodePoint()
54 dest->append("\\t"); in EscapeSpecialCodePoint()
57 dest->append("\\\\"); in EscapeSpecialCodePoint()
60 dest->append("\\\""); in EscapeSpecialCodePoint()
65 dest->append("\\u003C"); in EscapeSpecialCodePoint()
70 dest->append("\\u2028"); in EscapeSpecialCodePoint()
73 dest->append("\\u2029"); in EscapeSpecialCodePoint()
82 bool EscapeJSONStringImpl(const S& str, bool put_in_quotes, std::string* dest) { in EscapeJSONStringImpl() argument
86 dest->push_back('"'); in EscapeJSONStringImpl()
97 if (EscapeSpecialCodePoint(code_point, dest)) in EscapeJSONStringImpl()
102 base::StringAppendF(dest, kU16EscapeFormat, code_point); in EscapeJSONStringImpl()
104 WriteUnicodeCharacter(code_point, dest); in EscapeJSONStringImpl()
108 dest->push_back('"'); in EscapeJSONStringImpl()
115 bool EscapeJSONString(StringPiece str, bool put_in_quotes, std::string* dest) { in EscapeJSONString() argument
116 return EscapeJSONStringImpl(str, put_in_quotes, dest); in EscapeJSONString()
121 std::string* dest) { in EscapeJSONString() argument
122 return EscapeJSONStringImpl(str, put_in_quotes, dest); in EscapeJSONString()
126 std::string dest; in GetQuotedJSONString() local
127 EscapeJSONStringImpl(str, true, &dest); in GetQuotedJSONString()
128 return dest; in GetQuotedJSONString()
132 std::string dest; in GetQuotedJSONString() local
133 EscapeJSONStringImpl(str, true, &dest); in GetQuotedJSONString()
134 return dest; in GetQuotedJSONString()
139 std::string dest; in EscapeBytesAsInvalidJSONString() local
142 dest.push_back('"'); in EscapeBytesAsInvalidJSONString()
145 if (EscapeSpecialCodePoint(c, &dest)) in EscapeBytesAsInvalidJSONString()
149 base::StringAppendF(&dest, kU16EscapeFormat, in EscapeBytesAsInvalidJSONString()
152 dest.push_back(c); in EscapeBytesAsInvalidJSONString()
157 dest.push_back('"'); in EscapeBytesAsInvalidJSONString()
159 return dest; in EscapeBytesAsInvalidJSONString()