diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qstring.cpp | 16 | ||||
-rw-r--r-- | src/corelib/tools/qstring.h | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index d25b8e2082..14ed315710 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -2072,6 +2072,22 @@ QString &QString::append(QChar ch) Prepends the Latin-1 string \a str to this string. */ +/*! \fn QString &QString::prepend(const QChar *str, int len) + \since 5.5 + \overload prepend() + + Prepends \a len characters from the QChar array \a str to this string and + returns a reference to this string. +*/ + +/*! \fn QString &QString::prepend(const QStringRef &str) + \since 5.5 + \overload prepend() + + Prepends the string reference \a str to the beginning of this string and + returns a reference to this string. +*/ + /*! \fn QString &QString::prepend(const QByteArray &ba) \overload prepend() diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 06eb902161..532b294c28 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -428,7 +428,9 @@ public: QString &append(const QStringRef &s); QString &append(QLatin1String s); inline QString &prepend(QChar c) { return insert(0, c); } + inline QString &prepend(const QChar *uc, int len) { return insert(0, uc, len); } inline QString &prepend(const QString &s) { return insert(0, s); } + inline QString &prepend(const QStringRef &s) { return insert(0, s); } inline QString &prepend(QLatin1String s) { return insert(0, s); } inline QString &operator+=(QChar c) { |