Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qstringlist.cpp File Reference

(3ba8e2fbc483f8f5564bb30ee7437a9150e193b5)

#include <qstringlist.h>
#include <private/qduplicatetracker_p.h>
#include <QtCore/qlatin1stringmatcher.h>
#include <algorithm>
Include dependency graph for qstringlist.cpp:

Go to the source code of this file.

Functions

template<typename String>
static QStringList filter_helper (const QStringList &that, const String &needle, Qt::CaseSensitivity cs)
template<typename T>
static bool stringList_contains (const QStringList &stringList, const T &str, Qt::CaseSensitivity cs)
static qsizetype accumulatedSize (const QStringList &list, qsizetype seplen)
template<typename String>
qsizetype indexOf_helper (const QStringList &that, String needle, qsizetype from, Qt::CaseSensitivity cs)
template<typename String>
qsizetype lastIndexof_helper (const QStringList &that, String needle, qsizetype from, Qt::CaseSensitivity cs)

Function Documentation

◆ accumulatedSize()

qsizetype accumulatedSize ( const QStringList & list,
qsizetype seplen )
static

Definition at line 501 of file qstringlist.cpp.

◆ filter_helper()

template<typename String>
QStringList filter_helper ( const QStringList & that,
const String & needle,
Qt::CaseSensitivity cs )
static

Definition at line 240 of file qstringlist.cpp.

◆ indexOf_helper()

template<typename String>
qsizetype indexOf_helper ( const QStringList & that,
String needle,
qsizetype from,
Qt::CaseSensitivity cs )
\fn qsizetype QStringList::indexOf(const QString &str, qsizetype from, Qt::CaseSensitivity cs) const
\fn qsizetype QStringList::indexOf(QStringView str, qsizetype from, Qt::CaseSensitivity cs) const
\fn qsizetype QStringList::indexOf(QLatin1StringView str, qsizetype from, Qt::CaseSensitivity cs) const

Returns the index position of the first match of \a str in the list,
searching forward from index position \a from. Returns -1 if no item
matched.

\include qstringlist.cpp comparison-case-sensitivity

! [overloading-base-class-methods]

Note
The cs parameter was added in Qt 6.7, i.e. these methods now overload the methods inherited from the base class. Prior to that these methods only had two parameters. This change is source compatible and existing code should continue to work. ! [overloading-base-class-methods]
\sa lastIndexOf()

Definition at line 634 of file qstringlist.cpp.

◆ lastIndexof_helper()

template<typename String>
qsizetype lastIndexof_helper ( const QStringList & that,
String needle,
qsizetype from,
Qt::CaseSensitivity cs )

Definition at line 680 of file qstringlist.cpp.

◆ stringList_contains()

template<typename T>
bool stringList_contains ( const QStringList & stringList,
const T & str,
Qt::CaseSensitivity cs )
static

Definition at line 327 of file qstringlist.cpp.