51 #ifdef QT_INCLUDE_COMPAT
52 #include <Qt3Support/q3valuelist.h>
73 #ifdef Q_COMPILER_INITIALIZER_LISTS
74 inline QStringList(std::initializer_list<QString> args) :
QList<QString>(args) { }
78 inline int removeDuplicates();
80 inline QString join(
const QString &sep)
const;
90 { append(str);
return *
this; }
92 { *
this += l;
return *
this; }
96 inline QStringList &replaceInStrings(
const QRegExp &rx,
const QString &after);
97 inline int indexOf(
const QRegExp &rx,
int from = 0)
const;
98 inline int lastIndexOf(
const QRegExp &rx,
int from = -1)
const;
99 inline int indexOf(QRegExp &rx,
int from = 0)
const;
100 inline int lastIndexOf(QRegExp &rx,
int from = -1)
const;
102 #if !defined(Q_NO_USING_KEYWORD)
106 inline int indexOf(
const QString &str,
int from = 0)
const
108 inline int lastIndexOf(
const QString &str,
int from = -1)
const
112 static inline QT3_SUPPORT
QStringList split(
const QString &sep,
const QString &str,
bool allowEmptyEntries =
false);
113 static inline QT3_SUPPORT
QStringList split(
const QChar &sep,
const QString &str,
bool allowEmptyEntries =
false);
114 inline QT3_SUPPORT
QStringList grep(
const QString &str,
bool cs =
true)
const
118 static inline QT3_SUPPORT
QStringList split(
const QRegExp &sep,
const QString &str,
bool allowEmptyEntries =
false);
119 inline QT3_SUPPORT
QStringList grep(
const QRegExp &rx)
const {
return filter(rx); }
120 inline QT3_SUPPORT
QStringList &gres(
const QRegExp &rx,
const QString &after)
121 {
return replaceInStrings(rx, after); }
123 inline QT3_SUPPORT
QStringList &gres(
const QString &before,
const QString &after,
bool cs =
true)
126 inline Iterator QT3_SUPPORT fromLast() {
return (isEmpty() ?
end() : --
end()); }
127 inline ConstIterator QT3_SUPPORT fromLast()
const {
return (isEmpty() ?
end() : --
end()); }
218 inline QStringList QStringList::split(
const QChar &sep,
const QString &str,
bool allowEmptyEntries)
226 inline QStringList QStringList::split(
const QString &sep,
const QString &str,
bool allowEmptyEntries)
235 inline QStringList QStringList::split(
const QRegExp &sep,
const QString &str,
bool allowEmptyEntries)
242 #endif // QT_NO_REGEXP
244 #endif // QT3_SUPPORT
247 #ifndef QT_NO_DATASTREAM
254 return operator<<(out, static_cast<const QList<QString> &>(list));
256 #endif // QT_NO_DATASTREAM
262 #endif // QSTRINGLIST_H
void Q_CORE_EXPORT QStringList_replaceInStrings(QStringList *that, const QString &before, const QString &after, Qt::CaseSensitivity cs)
QStringList Q_CORE_EXPORT QStringList_filter(const QStringList *that, const QString &str, Qt::CaseSensitivity cs)
QStringList & operator<<(const QString &str)
int indexOf(const QRegExp &rx, int from=0) const
QStringList filter(const QString &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QDataStream & operator<<(QDataStream &out, const QStringList &list)
QMutableListIterator< QString > QMutableStringListIterator
int lastIndexOf(const T &t, int from=-1) const
#define QT_BEGIN_NAMESPACE
int Q_CORE_EXPORT QStringList_lastIndexOf(const QStringList *that, const QRegExp &rx, int from)
QStringList(const QStringList &l)
QStringList & replaceInStrings(const QString &before, const QString &after, Qt::CaseSensitivity cs=Qt::CaseSensitive)
void Q_CORE_EXPORT QStringList_sort(QStringList *that)
int Q_CORE_EXPORT QStringList_indexOf(const QStringList *that, const QRegExp &rx, int from)
int indexOf(const T &t, int from=0) const
QStringList split(const QString &sep, SplitBehavior behavior=KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const Q_REQUIRED_RESULT
QStringList operator+(const QStringList &other) const
QStringList(const QList< QString > &l)
int Q_CORE_EXPORT QStringList_removeDuplicates(QStringList *that)
QBool Q_CORE_EXPORT QStringList_contains(const QStringList *that, const QString &str, Qt::CaseSensitivity cs)
QString join(const QString &sep) const
QStringList(const QString &i)
QListIterator< QString > QStringListIterator
QString Q_CORE_EXPORT QStringList_join(const QStringList *that, const QString &sep)
QBool contains(const QString &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QDataStream & operator>>(QDataStream &in, QStringList &list)
QStringList & operator<<(const QStringList &l)
int lastIndexOf(const QRegExp &rx, int from=-1) const