MCPcopy Create free account
hub / github.com/apache/trafficserver / WriteSingleQuotedString

Function WriteSingleQuotedString

lib/yamlcpp/src/emitterutils.cpp:299–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297}
298
299bool WriteSingleQuotedString(ostream_wrapper& out, const std::string& str) {
300 out << "'";
301 int codePoint;
302 for (std::string::const_iterator i = str.begin();
303 GetNextCodePointAndAdvance(codePoint, i, str.end());) {
304 if (codePoint == '\n') {
305 return false; // We can't handle a new line and the attendant indentation
306 // yet
307 }
308
309 if (codePoint == '\'') {
310 out << "''";
311 } else {
312 WriteCodePoint(out, codePoint);
313 }
314 }
315 out << "'";
316 return true;
317}
318
319bool WriteDoubleQuotedString(ostream_wrapper& out, const std::string& str,
320 StringEscaping::value stringEscaping) {

Callers 1

emitter.cppFile · 0.85

Calls 4

WriteCodePointFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected