~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qstringlist-qt3.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/corelib/tools/qstringlist.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: Qt 3 Support Members for QStringList</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">Qt 3 Support Members for QStringList</h1>
 
21
<p><b>The following class members are part of the Qt 3 support layer.</b> They are provided to help you port old code to Qt 4. We advise against using them in new code.</p>
 
22
<p><ul><li><a href="qstringlist.html">QStringList class reference</a></li></ul></p>
 
23
<h3>Public Functions</h3>
 
24
<ul>
 
25
<li><div class="fn"/>Iterator <b><a href="qstringlist-qt3.html#fromLast">fromLast</a></b> ()</li>
 
26
<li><div class="fn"/>ConstIterator <b><a href="qstringlist-qt3.html#fromLast-2">fromLast</a></b> () const</li>
 
27
<li><div class="fn"/>QStringList <b><a href="qstringlist-qt3.html#grep">grep</a></b> ( const QString &amp; <i>str</i>, bool <i>cs</i> = true ) const</li>
 
28
<li><div class="fn"/>QStringList <b><a href="qstringlist-qt3.html#grep-2">grep</a></b> ( const QRegExp &amp; <i>rx</i> ) const</li>
 
29
<li><div class="fn"/>QStringList &amp; <b><a href="qstringlist-qt3.html#gres">gres</a></b> ( const QRegExp &amp; <i>rx</i>, const QString &amp; <i>after</i> )</li>
 
30
<li><div class="fn"/>QStringList &amp; <b><a href="qstringlist-qt3.html#gres-2">gres</a></b> ( const QString &amp; <i>before</i>, const QString &amp; <i>after</i>, bool <i>cs</i> = true )</li>
 
31
</ul>
 
32
<ul>
 
33
<li><div class="fn"/>7 public functions inherited from <a href="qlist.html#public-functions">QList</a></li>
 
34
</ul>
 
35
<h3>Static Public Members</h3>
 
36
<ul>
 
37
<li><div class="fn"/>QStringList <b><a href="qstringlist-qt3.html#split">split</a></b> ( const QRegExp &amp; <i>sep</i>, const QString &amp; <i>str</i>, bool <i>allowEmptyEntries</i> = false )</li>
 
38
<li><div class="fn"/>QStringList <b><a href="qstringlist-qt3.html#split-2">split</a></b> ( const QChar &amp; <i>sep</i>, const QString &amp; <i>str</i>, bool <i>allowEmptyEntries</i> = false )</li>
 
39
<li><div class="fn"/>QStringList <b><a href="qstringlist-qt3.html#split-3">split</a></b> ( const QString &amp; <i>sep</i>, const QString &amp; <i>str</i>, bool <i>allowEmptyEntries</i> = false )</li>
 
40
</ul>
 
41
<hr />
 
42
<h2>Member Function Documentation</h2>
 
43
<h3 class="fn"><a name="fromLast"></a><a href="qlist.html#Iterator-typedef">Iterator</a> QStringList::fromLast ()</h3>
 
44
<p>Use <a href="qlist.html#end">end</a>() instead.</p>
 
45
<p>For example, if you have code like</p>
 
46
<pre><font color="#404040">    QStringList::Iterator i = list.fromLast();</font></pre>
 
47
<p>you can rewrite it as</p>
 
48
<pre>    QStringList::Iterator i = list.isEmpty() ? list.end() : --list.end();</pre>
 
49
<h3 class="fn"><a name="fromLast-2"></a><a href="qlist.html#ConstIterator-typedef">ConstIterator</a> QStringList::fromLast () const</h3>
 
50
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
51
<p>Use <a href="qlist.html#end">end</a>() instead.</p>
 
52
<p>For example, if you have code like</p>
 
53
<pre><font color="#404040">    QStringList::ConstIterator i = list.fromLast();</font></pre>
 
54
<p>you can rewrite it as</p>
 
55
<pre>    QStringList::ConstIterator i = list.isEmpty() ? list.end() : --list.end();</pre>
 
56
<h3 class="fn"><a name="grep"></a>QStringList QStringList::grep ( const <a href="qstring.html">QString</a> &amp; <i>str</i>, bool <i>cs</i> = true ) const</h3>
 
57
<p>Use <a href="qlist-qt3.html#find">find</a>() instead.</p>
 
58
<h3 class="fn"><a name="grep-2"></a>QStringList QStringList::grep ( const <a href="qregexp.html">QRegExp</a> &amp; <i>rx</i> ) const</h3>
 
59
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
60
<p>Use <a href="qlist-qt3.html#find">find</a>() instead.</p>
 
61
<h3 class="fn"><a name="gres"></a>QStringList &amp; QStringList::gres ( const <a href="qregexp.html">QRegExp</a> &amp; <i>rx</i>, const <a href="qstring.html">QString</a> &amp; <i>after</i> )</h3>
 
62
<p>Use <a href="qlist.html#replace">replace</a>() instead.</p>
 
63
<h3 class="fn"><a name="gres-2"></a>QStringList &amp; QStringList::gres ( const <a href="qstring.html">QString</a> &amp; <i>before</i>, const <a href="qstring.html">QString</a> &amp; <i>after</i>, bool <i>cs</i> = true )</h3>
 
64
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
65
<p>Use <a href="qlist.html#replace">replace</a>() instead.</p>
 
66
<h3 class="fn"><a name="split"></a>QStringList QStringList::split ( const <a href="qregexp.html">QRegExp</a> &amp; <i>sep</i>, const <a href="qstring.html">QString</a> &amp; <i>str</i>, bool <i>allowEmptyEntries</i> = false )&nbsp;&nbsp;<tt> [static]</tt></h3>
 
67
<p>Splits the string <i>str</i> into strings wherever the regular expression <i>sep</i> occurs, and returns the list of those strings.</p>
 
68
<p>If <i>allowEmptyEntries</i> is true, an empty string is inserted in the list wherever the separator matches twice without intervening text.</p>
 
69
<p>For example, if you split the string &quot;a,,b,c&quot; on commas, split() returns the three-item list &quot;a&quot;, &quot;b&quot;, &quot;c&quot; if <i>allowEmptyEntries</i> is false (the default), and the four-item list &quot;a&quot;, &quot;&quot;, &quot;b&quot;, &quot;c&quot; if <i>allowEmptyEntries</i> is true.</p>
 
70
<p>Use <tt>split(QRegExp(&quot;\\s+&quot;), str)</tt> to split on arbitrary amounts of whitespace.</p>
 
71
<p>If <i>sep</i> does not match anywhere in <i>str</i>, split() returns a single element list with the element containing the original string, <i>str</i>.</p>
 
72
<p>See also <a href="qstringlist.html#join">join</a>() and <a href="qstring.html#section">QString::section</a>().</p>
 
73
<h3 class="fn"><a name="split-2"></a>QStringList QStringList::split ( const <a href="qchar.html">QChar</a> &amp; <i>sep</i>, const <a href="qstring.html">QString</a> &amp; <i>str</i>, bool <i>allowEmptyEntries</i> = false )&nbsp;&nbsp;<tt> [static]</tt></h3>
 
74
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
75
<p>This version of the function uses a <a href="qchar.html">QChar</a> as separator.</p>
 
76
<p>See also <a href="qstringlist.html#join">join</a>() and <a href="qstring.html#section">QString::section</a>().</p>
 
77
<h3 class="fn"><a name="split-3"></a>QStringList QStringList::split ( const <a href="qstring.html">QString</a> &amp; <i>sep</i>, const <a href="qstring.html">QString</a> &amp; <i>str</i>, bool <i>allowEmptyEntries</i> = false )&nbsp;&nbsp;<tt> [static]</tt></h3>
 
78
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
79
<p>This version of the function uses a <a href="qstring.html">QString</a> as separator.</p>
 
80
<p>If <i>sep</i> is an empty string, the return value is a list of one-character strings: split(<a href="qstring.html">QString</a>(&quot;&quot;), &quot;four&quot;) returns the four-item list, &quot;f&quot;, &quot;o&quot;, &quot;u&quot;, &quot;r&quot;.</p>
 
81
<p>If <i>allowEmptyEntries</i> is true, an empty string is inserted in the list wherever the separator matches twice without intervening text.</p>
 
82
<p>See also <a href="qstringlist.html#join">join</a>() and <a href="qstring.html#section">QString::section</a>().</p>
 
83
<p /><address><hr /><div align="center">
 
84
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
85
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
86
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
87
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
88
</tr></table></div></address></body>
 
89
</html>