MCPcopy Create free account
hub / github.com/ablab/spades / quote

Function quote

ext/src/llvm/JSON.cpp:563–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

561}
562
563static void quote(llvm::raw_ostream &OS, llvm::StringRef S) {
564 OS << '\"';
565 for (unsigned char C : S) {
566 if (C == 0x22 || C == 0x5C)
567 OS << '\\';
568 if (C >= 0x20) {
569 OS << C;
570 continue;
571 }
572 OS << '\\';
573 switch (C) {
574 // A few characters are common enough to make short escapes worthwhile.
575 case '\t':
576 OS << 't';
577 break;
578 case '\n':
579 OS << 'n';
580 break;
581 case '\r':
582 OS << 'r';
583 break;
584 default:
585 OS << 'u';
586 llvm::write_hex(OS, C, llvm::HexPrintStyle::Lower, 4);
587 break;
588 }
589 }
590 OS << '\"';
591}
592
593void llvm::json::OStream::value(const Value &V) {
594 switch (V.kind()) {

Callers 3

make_urlFunction · 0.85
valueMethod · 0.85
attributeBeginMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected