diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-04-24 11:32:17 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-04-28 16:41:36 +0000 |
commit | d21a147e2bad29906696125605328a563cd7ed2f (patch) | |
tree | c047b8e493cc3d6ae8cc638f25a8be1e145e2fb5 /src/corelib/tools/qstring.h | |
parent | 5f3d6ce5709466d08b11b6f2c8608d131e7c3f43 (diff) |
QStringView: add startsWith(), endsWith()
Change-Id: I72aef9236daedc3013c62d3f1d737159f85572b8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/tools/qstring.h')
-rw-r--r-- | src/corelib/tools/qstring.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 108021cfc4..3f9e4012c1 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -179,6 +179,14 @@ Q_DECLARE_TYPEINFO(QLatin1String, Q_MOVABLE_TYPE); // Qt 4.x compatibility typedef QLatin1String QLatin1Literal; +// +// QStringView members that require QLatin1String: +// +bool QStringView::startsWith(QLatin1String s, Qt::CaseSensitivity cs) const Q_DECL_NOTHROW +{ return qStartsWith(*this, s, cs); } +bool QStringView::endsWith(QLatin1String s, Qt::CaseSensitivity cs) const Q_DECL_NOTHROW +{ return qEndsWith(*this, s, cs); } + class Q_CORE_EXPORT QString { public: |