diff options
Diffstat (limited to 'src/corelib/doc/snippets/code/src_corelib_text_qbytearray.cpp')
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_text_qbytearray.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_text_qbytearray.cpp b/src/corelib/doc/snippets/code/src_corelib_text_qbytearray.cpp index 625f34e151..d86eb39290 100644 --- a/src/corelib/doc/snippets/code/src_corelib_text_qbytearray.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_text_qbytearray.cpp @@ -503,17 +503,4 @@ qDebug(ba.constData()); //! [53] QByteArray ba = QByteArrayLiteral("byte array contents"); //! [53] - -//! [54] -QByteArray ba("abc"); -const char big[10] = "abc"; -ba.compare(big); // returns -1, big is longer than ba - -// In contrast: -const char arr[] = "abc"; -ba.compare(arr); // returns 0, both have the same size and data - -const char *str = "abc"; -ba.compare(str); // returns 0, the size is determined by scanning for '\0' -//! [54] } |