diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2014-08-13 21:14:48 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-04-02 19:29:54 +0000 |
commit | 2a15c83c90f85971b98af14c6d36e5982a56152b (patch) | |
tree | 888c421d6bef9a981d063f2b4768fe5a0af8fb6a /src/corelib/tools/qstring.cpp | |
parent | d543b1c3d45766d1f88a47fae4611a9d6e2f33d0 (diff) |
Add QString::insert() overloads for QStringRef, const char*, QByteArray
The corresponding QString::append() overloads exists,
and so should insert().
[ChangeLog][QtCore][QString] Added insert(int, QStringRef),
insert(int, const char*) and insert(int, QByteArray).
Change-Id: I1cf43fe8908319e2a57415945718b72e69ca0fb3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Diffstat (limited to 'src/corelib/tools/qstring.cpp')
-rw-r--r-- | src/corelib/tools/qstring.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 8998b22be8..d25b8e2082 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -1828,6 +1828,51 @@ QString &QString::operator=(QChar ch) /*! + \fn QString& QString::insert(int position, const QStringRef &str) + \since 5.5 + \overload insert() + + Inserts the string reference \a str at the given index \a position and + returns a reference to this string. + + If the given \a position is greater than size(), the array is + first extended using resize(). +*/ + + +/*! + \fn QString& QString::insert(int position, const char *str) + \since 5.5 + \overload insert() + + Inserts the C string \a str at the given index \a position and + returns a reference to this string. + + If the given \a position is greater than size(), the array is + first extended using resize(). + + This function is not available when QT_NO_CAST_FROM_ASCII is + defined. +*/ + + +/*! + \fn QString& QString::insert(int position, const QByteArray &str) + \since 5.5 + \overload insert() + + Inserts the byte array \a str at the given index \a position and + returns a reference to this string. + + If the given \a position is greater than size(), the array is + first extended using resize(). + + This function is not available when QT_NO_CAST_FROM_ASCII is + defined. +*/ + + +/*! \fn QString &QString::insert(int position, QLatin1String str) \overload insert() |