diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-26 11:32:55 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-26 11:33:19 +0200 |
commit | 7810209ba32fcebfa90b081670595daaa5333a78 (patch) | |
tree | 98410d5cc7d9d762bbde0cb4eae8041aa6e2e542 /src/corelib/tools/qstringview.cpp | |
parent | 6f2eabb54e3f827ebd2b90f68144b86342933869 (diff) | |
parent | 88625709058b386ee74cca536c6c5556159c99fa (diff) |
Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: I4ea2b77cc201daed94fbe321f146dfd20365a534
Diffstat (limited to 'src/corelib/tools/qstringview.cpp')
-rw-r--r-- | src/corelib/tools/qstringview.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/corelib/tools/qstringview.cpp b/src/corelib/tools/qstringview.cpp index 050097b443..cc852dd042 100644 --- a/src/corelib/tools/qstringview.cpp +++ b/src/corelib/tools/qstringview.cpp @@ -530,6 +530,24 @@ QT_BEGIN_NAMESPACE */ /*! + \fn QString QStringView::arg(Args &&...args) const + \fn QString QLatin1String::arg(Args &&...args) const + \since 5.14 + + Replaces occurrences of \c{%N} in this string with the corresponding + argument from \a args. The arguments are not positional: the first of + the \a args replaces the \c{%N} with the lowest \c{N} (all of them), the + second of the \a args the \c{%N} with the next-lowest \c{N} etc. + + \c Args can consist of anything that implicitly converts to QStringView + or QLatin1String. + + In addition, the following types are also supported: QChar, QLatin1Char. + + \sa QString::arg() +*/ + +/*! \fn QChar QStringView::front() const Returns the first character in the string. Same as first(). @@ -755,6 +773,24 @@ QT_BEGIN_NAMESPACE */ /*! + \fn qsizetype QStringView::lastIndexOf(QStringView str, qsizetype from, Qt::CaseSensitivity cs) const + \fn qsizetype QStringView::lastIndexOf(QLatin1String l1, qsizetype from, Qt::CaseSensitivity cs) const + \fn qsizetype QStringView::lastIndexOf(QChar c, qsizetype from, Qt::CaseSensitivity cs) const + \since 5.14 + + Returns the index position of the last occurrence of the string-view \a str, + Latin-1 string \a l1, or character \a ch, respectively, in this string-view, + searching backward from index position \a from. If \a from is -1 (default), + the search starts at the last character; if \a from is -2, at the next to last + character and so on. Returns -1 if \a str is not found. + + If \a cs is Qt::CaseSensitive (default), the search is case + sensitive; otherwise the search is case insensitive. + + \sa QString::lastIndexOf() +*/ + +/*! \fn QByteArray QStringView::toLatin1() const Returns a Latin-1 representation of the string as a QByteArray. |