QtlMovie 1.12 (A specialized FFmpeg front-end)
QtlHexa.cpp File Reference

Functions

QString qtlHexa (const void *data, int size, Qtl::HexaFlags flags, int indent, int lineWidth, int initOffset)
 Build a multi-line string containing the hexadecimal dump of a memory area. More...
 
bool qtlHexaDecodeAndAppend (QtlByteBlock &result, const QString &hexaString)
 Interpret a string as a sequence of hexadecimal digits. More...
 

Function Documentation

◆ qtlHexaDecodeAndAppend()

bool qtlHexaDecodeAndAppend ( QtlByteBlock result,
const QString &  hexaString 
)

Interpret a string as a sequence of hexadecimal digits.

Interpret all hexadecimal digits in hexaString. Each pair of hexadecimal digits is interpreted as one byte value which is appended into a byte array. Space characters are ignored. Other characters generate an error.

Parameters
[in,out]resultA byte array. All decoded bytes are appended to this container.
[in]hexaStringThe string to decode.
Returns
True on success, false on error (invalid hexadecimal format). When returning false, result contains all bytes that could be decoded before getting the error.

◆ qtlHexa()

QString qtlHexa ( const void *  data,
int  size,
Qtl::HexaFlags  flags = Qtl::HexaFlags(Qtl::HexHexa),
int  indent = 0,
int  lineWidth = Qtl::DefautLineWidth,
int  initOffset = 0 
)

Build a multi-line string containing the hexadecimal dump of a memory area.

Parameters
[in]dataStarting address of the memory area to dump.
[in]sizeSize in bytes of the memory area to dump.
[in]flagsA combination of option flags indicating how to format the data.
[in]indentEach line is indented by this number of characters.
[in]lineWidthMaximum number of characters per line. If the flag HexBytesPerLine is specified, maxLineWidth is interpreted as the number of displayed byte values per line.
[in]initOffsetIf the flag HexOffset is specified, an offset in the memory area is displayed at the beginning of each line. In this case, initOffset specified the offset value for the first byte.
Returns
A string containing the formatted hexadecimal dump. Lines are separated with embedded new-line characters ('\n').
See also
Qtl::HexaFlag