Lines Matching refs:hex
175 std::ostream& operator<<(std::ostream& os, const AsHex& hex) {
178 DCHECK_GE(sizeof(hex.value) * 2, hex.min_width);
179 static constexpr size_t kMaxHexLength = 3 + sizeof(hex.value) * 2;
181 snprintf(buf, kMaxHexLength, "%s%.*" PRIx64, hex.with_prefix ? "0x" : "",
182 hex.min_width, hex.value);
186 std::ostream& operator<<(std::ostream& os, const AsHexBytes& hex) {
187 uint8_t bytes = hex.min_bytes;
188 while (bytes < sizeof(hex.value) && (hex.value >> (bytes * 8) != 0)) ++bytes;
192 hex.byte_order == AsHexBytes::kLittleEndian ? b : bytes - b - 1;
193 os << AsHex((hex.value >> (8 * printed_byte)) & 0xFF, 2);