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

Function WriteTag

lib/yamlcpp/src/emitterutils.cpp:438–457  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438bool WriteTag(ostream_wrapper& out, const std::string& str, bool verbatim) {
439 out << (verbatim ? "!<" : "!");
440 StringCharSource buffer(str.c_str(), str.size());
441 const RegEx& reValid = verbatim ? Exp::URI() : Exp::Tag();
442 while (buffer) {
443 int n = reValid.Match(buffer);
444 if (n <= 0) {
445 return false;
446 }
447
448 while (--n >= 0) {
449 out << buffer[0];
450 ++buffer;
451 }
452 }
453 if (verbatim) {
454 out << ">";
455 }
456 return true;
457}
458
459bool WriteTagWithPrefix(ostream_wrapper& out, const std::string& prefix,
460 const std::string& tag) {

Callers 1

emitter.cppFile · 0.85

Calls 4

TagClass · 0.70
c_strMethod · 0.45
sizeMethod · 0.45
MatchMethod · 0.45

Tested by

no test coverage detected