From d21a147e2bad29906696125605328a563cd7ed2f Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 24 Apr 2017 11:32:17 +0200 Subject: QStringView: add startsWith(), endsWith() Change-Id: I72aef9236daedc3013c62d3f1d737159f85572b8 Reviewed-by: Lars Knoll --- src/corelib/tools/qstring.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/corelib/tools/qstring.h') 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: -- cgit v1.2.3