以下成员源于类 QStringList are part of the Qt compatibility layer. We advise against using them in new code.
| 迭代器 | fromLast () |
| ConstIterator | fromLast () const |
| QStringList | grep (const QString & str , bool cs = true) const |
| QStringList | grep (const QRegExp & rx ) const |
| QStringList & | gres (const QRegExp & rx , const QString & after ) |
| QStringList & | gres (const QString & before , const QString & after , bool cs = true) |
| QStringList | split (const QRegExp & sep , const QString & str , bool allowEmptyEntries = false) |
| QStringList | split (const QChar & sep , const QString & str , bool allowEmptyEntries = false) |
| QStringList | split (const QString & sep , const QString & str , bool allowEmptyEntries = false) |
使用 end () 代替。
例如,若有代码像
QStringList::Iterator i = list.fromLast();
可以把它重写成
QStringList::Iterator i = list.isEmpty() ? list.end() : --list.end();
使用 end () 代替。
例如,若有代码像
QStringList::ConstIterator i = list.fromLast();
可以把它重写成
QStringList::ConstIterator i = list.isEmpty() ? list.end() : --list.end();
使用 filter () 代替。
使用 filter () 代替。
使用 replaceInStrings () 代替。
使用 replaceInStrings () 代替。
[static]
QStringList
QStringList::
split
(const
QRegExp
&
sep
, const
QString
&
str
,
bool
allowEmptyEntries
= false)
使用 QString::split ( sep , QString::SkipEmptyParts ) 或 QString::split ( sep , QString::KeepEmptyParts ) 代替。
Be aware that the QString::split ()'s return value is a QStringList that always contains at least one element, even if str is empty.
另请参阅 join () 和 QString::section ().
[static]
QStringList
QStringList::
split
(const
QChar
&
sep
, const
QString
&
str
,
bool
allowEmptyEntries
= false)
这是重载函数。
This version of the function uses a QChar as separator.
另请参阅 join () 和 QString::section ().
[static]
QStringList
QStringList::
split
(const
QString
&
sep
, const
QString
&
str
,
bool
allowEmptyEntries
= false)
这是重载函数。
This version of the function uses a QString as separator.
另请参阅 join () 和 QString::section ().