ost::HEXdump(3)
π ost::HEXdump(3) π
okay so bestie, welcome to the Library Functions Manual entry for ost::HEXdump β yes it's a 3-section page, yes it's a C++ class, and yes we're gonna get through it together, no cap β¨
πΈ NAME πΈ
ost::HEXdump β produces a dump of a buffer in a hexdump way with its code Ascii translation and relative buffer address. it's giving "old school hexdump(1) but make it a class" π«Ά
β¨ SYNOPSIS β¨
#include <applog.h>
π Public Member Functions π
HEXdump(const unsigned char *buffer, int buff_len, int max_len=200)β the HEXdump constructor, we love a good constructor πvirtual ~HEXdump()β the HEXdump destructor, rip king, virtual so it behaves πconst char *c_str() constβ const char* cast provided for conveneince (their spelling, not mine, but slay, i'm keeping it exactly as written π)std::string str()β string cast provided for conveneince, same energy, same spelling π
π¦ Protected Attributes π¦
std::string _strβ output string, it's the whole vibe holder lowkey
π Friends π
std::ostream &operator<<(std::ostream &out, const HEXdump &hd)β operator <<, the friend that actually shows up for you π«Ά
π Detailed Description π
Produces a dump of a buffer in a hexdump way with its code Ascii translation and relative buffer address.
for instance (and this is literally from the docs, don't @ me):
0000000 - 77 98 21 49 0e 00 05 00 40 1c 01 1c 2f 00 00 00
w.!I......./...
see how the bytes are up top and the ascii translation just vibes underneath? iconic honestly π₯
π§ Constructor & Destructor Documentation π§
ost::HEXdump::HEXdump(const unsigned char *buffer, int buff_len, int max_len = 200)
HEXdump constructor. the main character of this whole page β¨
Parameters
bufferβ buffer to be 'hexdumped'. yes with the quotes, they're very real about itbuff_lenβ buffer lengthmax_lenβ max number of bytes to be 'hexdumped'. Usefull to truncate output.mas_len=0does prints all.
ok so heads up bestie β the original text literally writesmas_len=0there (notmax_len), and it says "does prints all". i am not fixing it, that's not my job, i'm just the messenger π«Ά also note: when it's0, you get everything, no truncation, periodt.
virtual ost::HEXdump::~HEXdump() [inline], [virtual]
HEXdump destructor. it's inline, it's virtual, it's saying goodbye with dignity π
β Member Function Documentation β
const char* ost::HEXdump::c_str() const [inline]
const char* cast provided for conveneince. (convenience* but we're keeping the original spelling because the rules are the rules πΈ)
std::string ost::HEXdump::str() [inline]
string cast provided for conveneince. same deal, same spelling, same slay π
π Friends And Related Function Documentation π
std::ostream& operator<<(std::ostream &out, const HEXdump &hd) [friend]
operator << β the friend function, doing the actual printing work, lowkey carrying the team π«Ά
Parameters
hdβ hexdump.
Returns
- application logger stream
π Member Data Documentation π
std::string ost::HEXdump::_str [protected]
output string. it's protected, it holds the output, it's literally the whole point, no notes π
π Author π
Generated automatically by Doxygen for GNU CommonC++ from the source code.
okay bestie that's the whole page, you ate that reading session, i'm so proud of you π₯Ήπ
cute little sign-off: this absolute gem of a manual page comes from GNU CommonC++, dated Sun Dec 27 2020, and it lives at ost::HEXdump(3) in the manual β take care of her, she's doing her best β¨π
π¦ where this page comes from
- ubuntu jammy: libcommoncpp2-doc 1.8.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms