From https://doc.qt.io/qt-5/qstring.html
"A QString can embed '\0' characters (QChar::Null). The size() function always returns the size of the whole string, including embedded '\0' characters."
Yet I am observing:
QString frameDataAsString =
"SEND\n"
"content-length:23\n\n"
"Before a Null\0And after";
and in GDB:
(gdb) p frameDataAsString
$1 = "SEND\ncontent-length:23\n\nBefore a Null"
(gdb) p frameDataAsString.size()
$2 = 37
How then, does one "embed a NULL" into the string?