| 133 | } |
| 134 | |
| 135 | void ToPrintable::Print(std::ostream& os) const { |
| 136 | OStreamAppender appender(os); |
| 137 | if (_iobuf) { |
| 138 | PrintIOBuf(&appender, *_iobuf, _max_length); |
| 139 | } else if (!_str.empty()) { |
| 140 | PrintString(&appender, _str, _max_length); |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | std::string ToPrintableString(const IOBuf& data, size_t max_length) { |
| 145 | std::string result; |
no test coverage detected