#include #include #include namespace DB { void verbosePrintString(const char * begin, const char * end, WriteBuffer & out) { if (end == begin) { out << ""; return; } out << "\""; for (const char * pos = begin; pos < end; ++pos) { switch (*pos) { case '\0': out << ""; break; case '\b': out << ""; break; case '\f': out << "
"; break; case '\n': out << ""; break; case '\r': out << ""; break; case '\t': out << ""; break; case '\\': out << ""; break; case '"': out << ""; break; case '\'': out << ""; break; default: { if (static_cast(*pos) < 32) /// ASCII control characters out << "<0x" << hexDigitUppercase(*pos / 16) << hexDigitUppercase(*pos % 16) << ">"; else out << *pos; } } } out << "\""; } }