summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qbytearrayview.qdoc
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2021-08-09 15:19:02 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2021-08-11 22:32:42 +0200
commit6f833eff92fe703a13214a0c1a593d94e51847d1 (patch)
treec90f1862030c850cfe6b22e47a458c055a16e833 /src/corelib/text/qbytearrayview.qdoc
parent761f32ae2ad98e8fb12a4f05b45b4aa277e47a1b (diff)
Add QByteArrayView::trimmed()
Unlike simplified(), it just moves the end-points, without needing to modify contents, so it makes sense (as for QStringView and QLatin1String) to provide it. Moved QByteArray's trimmed() tests to tst_QByteArrayApiSymmetry so that QBAV can now share them. [ChangeLog][QtCore][QByteArrayView] Added trimmed(). Change-Id: Ifd7a752adb5f3d3e2ad0aa8220efa7e7d2d39baa Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'src/corelib/text/qbytearrayview.qdoc')
-rw-r--r--src/corelib/text/qbytearrayview.qdoc17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/corelib/text/qbytearrayview.qdoc b/src/corelib/text/qbytearrayview.qdoc
index 30d8d47685..740734ebbd 100644
--- a/src/corelib/text/qbytearrayview.qdoc
+++ b/src/corelib/text/qbytearrayview.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2020 The Qt Company Ltd.
+** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -620,6 +620,21 @@
*/
/*!
+ \fn QByteArrayView QByteArrayView::trimmed() const noexcept
+ \since 6.3
+
+ Returns a copy of this byte array view with spacing characters
+ removed from the start and end.
+
+ The spacing characters are those for which the standard C++ \c isspace()
+ function returns \c true in the C locale; these are the ASCII characters
+ tabulation '\\t', line feed '\\n', carriage return '\\r', vertical
+ tabulation '\\v', form feed '\\f', and space ' '.
+
+ \sa QChar::SpecialCharacter, {QByteArray#Spacing Characters}{Spacing Characters}
+*/
+
+/*!
\fn bool QByteArrayView::startsWith(QByteArrayView bv) const
\fn bool QByteArrayView::startsWith(char ch) const