Lines Matching defs:char
70 void PrintByteSegmentInObjectTo(const unsigned char* obj_bytes, size_t start,
72 char text[5] = "";
89 void PrintBytesInObjectToImpl(const unsigned char* obj_bytes, size_t count,
112 // specify if char / wchar_t is signed or unsigned, it is important to first
130 void PrintBytesInObjectTo(const unsigned char* obj_bytes, size_t count,
135 // Depending on the value of a char (or wchar_t), we print it in one
147 // Prints c (of type char, char8_t, char16_t, char32_t, or wchar_t) as a
186 *os << static_cast<char>(c);
213 static const char* GetCharWidthPrefix(char) { return ""; }
215 static const char* GetCharWidthPrefix(signed char) { return ""; }
217 static const char* GetCharWidthPrefix(unsigned char) { return ""; }
220 static const char* GetCharWidthPrefix(char8_t) { return "u8"; }
223 static const char* GetCharWidthPrefix(char16_t) { return "u"; }
225 static const char* GetCharWidthPrefix(char32_t) { return "U"; }
227 static const char* GetCharWidthPrefix(wchar_t) { return "L"; }
229 // Prints a char c as if it's part of a string literal, escaping it when
231 static CharFormat PrintAsStringLiteralTo(char c, ostream* os) {
249 // Prints a character c (of type char, char8_t, char16_t, char32_t, or wchar_t)
276 void PrintTo(unsigned char c, ::std::ostream* os) { PrintCharAndCodeTo(c, os); }
277 void PrintTo(signed char c, ::std::ostream* os) { PrintCharAndCodeTo(c, os); }
298 char buf[40];
299 char* p = buf + sizeof(buf);
319 char digit = static_cast<char>(carry % 10);
320 *--p = static_cast<char>('0' + digit);
335 // char, char8_t, char16_t, char32_t, or wchar_t.
343 const char* const quote_prefix = GetCharWidthPrefix(*begin);
365 // Prints a (const) char/wchar_t array of 'len' elements, starting at address
366 // 'begin'. CharType must be either char or wchar_t.
374 // const char kFoo[] = "foo";
377 // Therefore when printing a char array, we don't print the last element if
386 // const char kFoo[] = { 'f', 'o', 'o' };
393 // Prints a (const) char array of 'len' elements, starting at address 'begin'.
394 void UniversalPrintArray(const char* begin, size_t len, ostream* os) {
439 void PrintTo(const char* s, ostream* os) { PrintCStringTo(s, os); }
462 bool ContainsUnprintableControlCodes(const char* str, size_t length) {
463 const unsigned char* s = reinterpret_cast<const unsigned char*>(str);
466 unsigned char ch = *s++;
481 bool IsUTF8TrailByte(unsigned char t) { return 0x80 <= t && t <= 0xbf; }
483 bool IsValidUTF8(const char* str, size_t length) {
484 const unsigned char* s = reinterpret_cast<const unsigned char*>(str);
487 unsigned char lead = s[i++];
516 void ConditionalPrintAsText(const char* str, size_t length, ostream* os) {