diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-10-17 02:25:53 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-11-26 14:43:20 +0100 |
commit | 5771591fbce7d3f4359aea7342d036c8f287bb64 (patch) | |
tree | 0ed31eef86e85e97f0c143ab210585cfe3088e3f /src/corelib/text/qstring.h | |
parent | b475c3e67e79a1b2231f8139c4956de960d1cb37 (diff) |
QString/QByteArray: add erase() for iterators
Otherwise they're not usable with iterator-based algorithms
that e.g. remove, partition and the like.
[ChangeLog][QtCore][QString] Added erase().
[ChangeLog][QtCore][QByteArray] Added erase().
Change-Id: I78829b1a5365dd53b6b6423ceedbc52edeafbc63
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'src/corelib/text/qstring.h')
-rw-r--r-- | src/corelib/text/qstring.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/text/qstring.h b/src/corelib/text/qstring.h index 013b367b5c..fa4eeb0367 100644 --- a/src/corelib/text/qstring.h +++ b/src/corelib/text/qstring.h @@ -1016,6 +1016,7 @@ public: inline void push_front(QChar c) { prepend(c); } inline void push_front(const QString &s) { prepend(s); } void shrink_to_fit() { squeeze(); } + iterator erase(const_iterator first, const_iterator last); static inline QString fromStdString(const std::string &s); inline std::string toStdString() const; |