Lines Matching refs:os
71 size_t count, ostream* os) {
79 *os << ' ';
81 *os << '-';
84 *os << text;
90 ostream* os) {
92 *os << count << "-byte object <";
100 PrintByteSegmentInObjectTo(obj_bytes, 0, count, os);
102 PrintByteSegmentInObjectTo(obj_bytes, 0, kChunkSize, os);
103 *os << " ... ";
106 PrintByteSegmentInObjectTo(obj_bytes, resume_pos, count - resume_pos, os);
108 *os << ">";
131 ostream* os) {
132 PrintBytesInObjectToImpl(obj_bytes, count, os);
151 static CharFormat PrintAsCharLiteralTo(Char c, ostream* os) {
155 *os << "\\0";
158 *os << "\\'";
161 *os << "\\\\";
164 *os << "\\a";
167 *os << "\\b";
170 *os << "\\f";
173 *os << "\\n";
176 *os << "\\r";
179 *os << "\\t";
182 *os << "\\v";
186 *os << static_cast<char>(c);
189 ostream::fmtflags flags = os->flags();
190 *os << "\\x" << std::hex << std::uppercase << static_cast<int>(u_c);
191 os->flags(flags);
200 static CharFormat PrintAsStringLiteralTo(char32_t c, ostream* os) {
203 *os << "'";
206 *os << "\\\"";
209 return PrintAsCharLiteralTo(c, os);
231 static CharFormat PrintAsStringLiteralTo(char c, ostream* os) {
232 return PrintAsStringLiteralTo(ToChar32(c), os);
236 static CharFormat PrintAsStringLiteralTo(char8_t c, ostream* os) {
237 return PrintAsStringLiteralTo(ToChar32(c), os);
241 static CharFormat PrintAsStringLiteralTo(char16_t c, ostream* os) {
242 return PrintAsStringLiteralTo(ToChar32(c), os);
245 static CharFormat PrintAsStringLiteralTo(wchar_t c, ostream* os) {
246 return PrintAsStringLiteralTo(ToChar32(c), os);
253 void PrintCharAndCodeTo(Char c, ostream* os) {
255 *os << GetCharWidthPrefix(c) << "'";
256 const CharFormat format = PrintAsCharLiteralTo(c, os);
257 *os << "'";
263 *os << " (" << static_cast<int>(c);
271 *os << ", 0x" << String::FormatHexInt(static_cast<int>(c));
273 *os << ")";
276 void PrintTo(unsigned char c, ::std::ostream* os) { PrintCharAndCodeTo(c, os); }
277 void PrintTo(signed char c, ::std::ostream* os) { PrintCharAndCodeTo(c, os); }
281 void PrintTo(wchar_t wc, ostream* os) { PrintCharAndCodeTo(wc, os); }
284 void PrintTo(char32_t c, ::std::ostream* os) {
285 *os << std::hex << "U+" << std::uppercase << std::setfill('0') << std::setw(4)
291 void PrintTo(__uint128_t v, ::std::ostream* os) {
293 *os << "0";
322 *os << p;
324 void PrintTo(__int128_t v, ::std::ostream* os) {
327 *os << "-";
330 PrintTo(uv, os);
342 PrintCharsAsStringTo(const CharType* begin, size_t len, ostream* os) {
344 *os << quote_prefix << "\"";
353 *os << "\" " << quote_prefix << "\"";
355 is_previous_hex = PrintAsStringLiteralTo(cur, os) == kHexEscape;
361 *os << "\"";
372 ostream* os) {
381 PrintCharsAsStringTo(begin, len - 1, os);
389 PrintCharsAsStringTo(begin, len, os);
390 *os << " (no terminating NUL)";
394 void UniversalPrintArray(const char* begin, size_t len, ostream* os) {
395 UniversalPrintCharArray(begin, len, os);
401 void UniversalPrintArray(const char8_t* begin, size_t len, ostream* os) {
402 UniversalPrintCharArray(begin, len, os);
408 void UniversalPrintArray(const char16_t* begin, size_t len, ostream* os) {
409 UniversalPrintCharArray(begin, len, os);
414 void UniversalPrintArray(const char32_t* begin, size_t len, ostream* os) {
415 UniversalPrintCharArray(begin, len, os);
420 void UniversalPrintArray(const wchar_t* begin, size_t len, ostream* os) {
421 UniversalPrintCharArray(begin, len, os);
428 void PrintCStringTo(const Char* s, ostream* os) {
430 *os << "NULL";
432 *os << ImplicitCast_<const void*>(s) << " pointing to ";
433 PrintCharsAsStringTo(s, std::char_traits<Char>::length(s), os);
439 void PrintTo(const char* s, ostream* os) { PrintCStringTo(s, os); }
442 void PrintTo(const char8_t* s, ostream* os) { PrintCStringTo(s, os); }
445 void PrintTo(const char16_t* s, ostream* os) { PrintCStringTo(s, os); }
447 void PrintTo(const char32_t* s, ostream* os) { PrintCStringTo(s, os); }
457 void PrintTo(const wchar_t* s, ostream* os) { PrintCStringTo(s, os); }
516 void ConditionalPrintAsText(const char* str, size_t length, ostream* os) {
519 *os << "\n As Text: \"" << str << "\"";
525 void PrintStringTo(const ::std::string& s, ostream* os) {
526 if (PrintCharsAsStringTo(s.data(), s.size(), os) == kHexEscape) {
528 ConditionalPrintAsText(s.data(), s.size(), os);
534 void PrintU8StringTo(const ::std::u8string& s, ostream* os) {
535 PrintCharsAsStringTo(s.data(), s.size(), os);
539 void PrintU16StringTo(const ::std::u16string& s, ostream* os) {
540 PrintCharsAsStringTo(s.data(), s.size(), os);
543 void PrintU32StringTo(const ::std::u32string& s, ostream* os) {
544 PrintCharsAsStringTo(s.data(), s.size(), os);
548 void PrintWideStringTo(const ::std::wstring& s, ostream* os) {
549 PrintCharsAsStringTo(s.data(), s.size(), os);