24 : pBuffer(buffer), pSize(size)
29 : pBuffer(rhs.pBuffer), pSize(rhs.pSize)
35 : pBuffer((const char *)buffer.data()), pSize(buffer.sizeInBytes())
46 for (printed = 0; printed < pSize; printed += 0x10)
48 remains = pSize - printed;
54 dumpHexadecimal(line, pBuffer + printed, (remains > 0x10) ? 0x10 : remains);
57 dumpPrintable(line, pBuffer + printed, (remains > 0x10) ? 0x10 : remains);
60 line.
appendFormat(
" %04.4x-%04.4x\n", printed, printed + 0x0f);
87 hexDumper.
dump(outStream);
CString & clear()
Empty the string.
Definition: string.hxx:693
Hexdump(const char *buffer, uint size)
Construct from a simple buffer.
Definition: hexdump.hxx:23
Definition: program.cpp:19
A simple hexadecimal buffer dumper.
Definition: hexdump.h:51
CString & appendFormat(const char *format,...)
Append formatted string.
Definition: string.hxx:2729
void dump(U &outStream) const
Dumps the current buffer to a stream.
Definition: hexdump.hxx:40
Character stringThe class manipulates and stores sequences of characters.
Definition: fwd.h:32
String dump() const
Dumps the current buffer to a string.
Definition: hexdump.hxx:69