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

« back to all changes in this revision

Viewing changes to doc/html/qstringlist.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: QStringList Class Reference</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">QStringList Class Reference</h1>
 
21
<p>The QStringList class provides a list of strings. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QStringList&gt;</pre><p>Part of the <a href="qtcore.html">QtCore</a> module.</p>
 
23
<p>Inherits <a href="qlist.html">QList&lt;QString&gt;</a>.</p>
 
24
<p><b>Note:</b> All the functions in this class are <a href="threads.html#reentrant">reentrant</a>.</p>
 
25
<ul>
 
26
<li><a href="qstringlist-members.html">List of all members, including inherited members</a></li>
 
27
<li><a href="qstringlist-qt3.html">Qt 3 support members</a></li>
 
28
</ul>
 
29
<a name="public-functions"></a>
 
30
<h3>Public Functions</h3>
 
31
<ul>
 
32
<li><div class="fn"/><b><a href="qstringlist.html#QStringList">QStringList</a></b> ()</li>
 
33
<li><div class="fn"/><b><a href="qstringlist.html#QStringList-2">QStringList</a></b> ( const QString &amp; <i>str</i> )</li>
 
34
<li><div class="fn"/><b><a href="qstringlist.html#QStringList-3">QStringList</a></b> ( const QStringList &amp; <i>other</i> )</li>
 
35
<li><div class="fn"/><b><a href="qstringlist.html#QStringList-4">QStringList</a></b> ( const QList&lt;QString&gt; &amp; <i>other</i> )</li>
 
36
<li><div class="fn"/>bool <b><a href="qstringlist.html#contains">contains</a></b> ( const QString &amp; <i>str</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive ) const</li>
 
37
<li><div class="fn"/>QStringList <b><a href="qstringlist.html#filter">filter</a></b> ( const QString &amp; <i>str</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive ) const</li>
 
38
<li><div class="fn"/>QStringList <b><a href="qstringlist.html#filter-2">filter</a></b> ( const QRegExp &amp; <i>rx</i> ) const</li>
 
39
<li><div class="fn"/>int <b><a href="qstringlist.html#indexOf">indexOf</a></b> ( const QRegExp &amp; <i>rx</i>, int <i>from</i> = 0 ) const</li>
 
40
<li><div class="fn"/>QString <b><a href="qstringlist.html#join">join</a></b> ( const QString &amp; <i>sep</i> ) const</li>
 
41
<li><div class="fn"/>int <b><a href="qstringlist.html#lastIndexOf">lastIndexOf</a></b> ( const QRegExp &amp; <i>rx</i>, int <i>from</i> = -1 ) const</li>
 
42
<li><div class="fn"/>QStringList &amp; <b><a href="qstringlist.html#replaceInStrings">replaceInStrings</a></b> ( const QString &amp; <i>before</i>, const QString &amp; <i>after</i>, Qt::CaseSensitivity <i>cs</i> = Qt::CaseSensitive )</li>
 
43
<li><div class="fn"/>QStringList &amp; <b><a href="qstringlist.html#replaceInStrings-2">replaceInStrings</a></b> ( const QRegExp &amp; <i>rx</i>, const QString &amp; <i>after</i> )</li>
 
44
<li><div class="fn"/>void <b><a href="qstringlist.html#sort">sort</a></b> ()</li>
 
45
<li><div class="fn"/>QStringList <b><a href="qstringlist.html#operator-2b">operator+</a></b> ( const QStringList &amp; <i>other</i> ) const</li>
 
46
<li><div class="fn"/>QStringList &amp; <b><a href="qstringlist.html#operator-lt-lt">operator&lt;&lt;</a></b> ( const QString &amp; <i>str</i> )</li>
 
47
<li><div class="fn"/>QStringList &amp; <b><a href="qstringlist.html#operator-lt-lt-2">operator&lt;&lt;</a></b> ( const QStringList &amp; <i>other</i> )</li>
 
48
</ul>
 
49
<ul>
 
50
<li><div class="fn"/>60 public functions inherited from <a href="qlist.html#public-functions">QList</a></li>
 
51
</ul>
 
52
<a name="related-non-members"></a>
 
53
<h3>Related Non-Members</h3>
 
54
<ul>
 
55
<li><div class="fn"/>typedef <b><a href="qstringlist.html#QMutableStringListIterator-typedef">QMutableStringListIterator</a></b></li>
 
56
<li><div class="fn"/>typedef <b><a href="qstringlist.html#QStringListIterator-typedef">QStringListIterator</a></b></li>
 
57
<li><div class="fn"/>QDataStream &amp; <b><a href="qstringlist.html#operator-lt-lt-53">operator&lt;&lt;</a></b> ( QDataStream &amp; <i>out</i>, const QStringList &amp; <i>list</i> )</li>
 
58
<li><div class="fn"/>QDataStream &amp; <b><a href="qstringlist.html#operator-gt-gt-34">operator&gt;&gt;</a></b> ( QDataStream &amp; <i>in</i>, QStringList &amp; <i>list</i> )</li>
 
59
</ul>
 
60
<h3>Additional Inherited Members</h3>
 
61
<ul>
 
62
<li><div class="fn"/>3 static public members inherited from <a href="qlist.html#static-public-members">QList</a></li>
 
63
</ul>
 
64
<a name="details"></a>
 
65
<hr />
 
66
<h2>Detailed Description</h2>
 
67
<p>The QStringList class provides a list of strings.</p>
 
68
<p>QStringList inherits from <a href="qlist.html">QList</a>&lt;<a href="qstring.html">QString</a>&gt;. All of <a href="qlist.html">QList</a>'s functionality also applies to QStringList. For example, you can use <a href="qlist.html#isEmpty">isEmpty</a>() to test whether the list is empty, and you can call functions like <a href="qlist.html#append">append</a>(), <a href="qlist.html#prepend">prepend</a>(), <a href="qlist.html#insert">insert</a>(), <a href="qlist.html#replace">replace</a>(), and <a href="qlist-qt3.html#remove">remove</a>() to modify a QStringList. In addition, QStringList provides a few convenience functions that make handling lists of strings easier.</p>
 
69
<p>Like <a href="qlist.html">QList</a>, QStringList is <a href="shclass.html#implicitly-shared">implicitly shared</a>. QStringList provides fast index-based access as well as fast insertions and removals. Passing string lists as value parameters is both fast and safe.</p>
 
70
<p>Strings can be added to a list using <a href="qlist.html#append">append</a>(), operator+=(), or operator&lt;&lt;(). For example:</p>
 
71
<pre>&nbsp;   QStringList fonts;
 
72
    fonts &lt;&lt; &quot;Arial&quot; &lt;&lt; &quot;Helvetica&quot; &lt;&lt; &quot;Times&quot; &lt;&lt; &quot;Courier&quot;;</pre>
 
73
<p>To iterate over a string, you can either use index positions or <a href="qlist.html">QList</a>'s Java-style and STL-style iterator types. Here are examples of each approach.</p>
 
74
<p>Indexing:</p>
 
75
<pre>&nbsp;   for (int i = 0; i &lt; fonts.size(); ++i)
 
76
        cout &lt;&lt; fonts.at(i).ascii() &lt;&lt; endl;</pre>
 
77
<p>Java-style iterator:</p>
 
78
<pre>&nbsp;   QStringListIterator i(fonts);
 
79
    while (i.hasNext())
 
80
        cout &lt;&lt; i.next().ascii() &lt;&lt; endl;</pre>
 
81
<p>STL-style iterator:</p>
 
82
<pre>&nbsp;   QStringList::const_iterator i;
 
83
    for (i = fonts.constBegin(); i != fonts.constEnd(); ++i)
 
84
        cout &lt;&lt; (*i).ascii() &lt;&lt; endl;</pre>
 
85
<p><a href="qstringlist.html#QStringListIterator-typedef">QStringListIterator</a> and <a href="qstringlist.html#QMutableStringListIterator-typedef">QMutableStringListIterator</a> are simply typedefs for <a href="qlistiterator.html">QListIterator</a>&lt;<a href="qstring.html">QString</a>&gt; and <a href="qmutablelistiterator.html">QMutableListIterator</a>&lt;<a href="qstring.html">QString</a>&gt;.</p>
 
86
<p>You can concatenate all the strings in a string list into a single string (with an optional separator) using <a href="qstringlist.html#join">join</a>(). For example:</p>
 
87
<pre>&nbsp;   QString str = fonts.join(&quot;,&quot;);
 
88
    // str == &quot;Arial,Helvetica,Times,Courier&quot;</pre>
 
89
<p>To break up a string into a string list, use <a href="qstring.html#split">QString::split</a>():</p>
 
90
<pre>&nbsp;   QString str = &quot;Arial,Helvetica,Times,Courier&quot;;
 
91
    QStringList list = str.split(&quot;,&quot;);
 
92
    // list: [&quot;Arial&quot;, &quot;Helvetica&quot;, &quot;Times&quot;, &quot;Courier&quot;]</pre>
 
93
<p>The argument to split can be a single character, a string, or a <a href="qregexp.html">QRegExp</a>.</p>
 
94
<p>You can sort a string list with <a href="qstringlist.html#sort">sort</a>(), and extract a new list which contains only those strings which contain a particular substring (or match a particular regular expression) using the <a href="qlist-qt3.html#find">find</a>() functions. For example:</p>
 
95
<pre>&nbsp;   QStringList monospacedFonts = fonts.find(QRegExp(&quot;Courier|Fixed&quot;));</pre>
 
96
<p>Similarly, the <a href="qlist.html#replace">replace</a>() function calls <a href="qstring.html#replace">QString::replace</a>() on each string in the string list in turn. Here's an example that uses it to replace all occurrences of &quot;$QTDIR&quot; with &quot;/usr/lib/qt&quot; in a string list:</p>
 
97
<pre>&nbsp;   QStringList files;
 
98
    files &lt;&lt; &quot;$QTDIR/src/moc/moc.y&quot;
 
99
          &lt;&lt; &quot;$QTDIR/src/moc/moc.l&quot;
 
100
          &lt;&lt; &quot;$QTDIR/include/qconfig.h&quot;;
 
101
 
 
102
    files.replace(&quot;$QTDIR&quot;, &quot;/usr/lib/qt&quot;);</pre>
 
103
<p>See also <a href="qstring.html">QString</a>, <a href="qstringlist.html#QStringListIterator-typedef">QStringListIterator</a>, and <a href="qstringlist.html#QMutableStringListIterator-typedef">QMutableStringListIterator</a>.</p>
 
104
<hr />
 
105
<h2>Member Function Documentation</h2>
 
106
<h3 class="fn"><a name="QStringList"></a>QStringList::QStringList ()</h3>
 
107
<p>Constructs an empty string list.</p>
 
108
<h3 class="fn"><a name="QStringList-2"></a>QStringList::QStringList ( const <a href="qstring.html">QString</a> &amp; <i>str</i> )</h3>
 
109
<p>Constructs a string list that contains one string, <i>str</i>. Longer lists are easily created like this:</p>
 
110
<pre>&nbsp;   list = (QStringList() &lt;&lt; str1 &lt;&lt; str2 &lt;&lt; str3);</pre>
 
111
<h3 class="fn"><a name="QStringList-3"></a>QStringList::QStringList ( const QStringList &amp; <i>other</i> )</h3>
 
112
<p>Constructs a copy of <i>other</i>.</p>
 
113
<p>This operation takes <a href="containers.html#constant-time">constant time</a>, because <a href="qstringlist.html">QStringList</a> is <a href="shclass.html#implicitly-shared">implicitly shared</a>. This makes returning a <a href="qstringlist.html">QStringList</a> from a function very fast. If a shared instance is modified, it will be copied (copy-on-write), and that takes <a href="containers.html#linear-time">linear time</a>.</p>
 
114
<p>See also <a href="qlist.html#operator-eq">operator=</a>().</p>
 
115
<h3 class="fn"><a name="QStringList-4"></a>QStringList::QStringList ( const <a href="qlist.html">QList</a>&lt;<a href="qstring.html">QString</a>&gt; &amp; <i>other</i> )</h3>
 
116
<p>Constructs a copy of <i>other</i>.</p>
 
117
<p>This operation takes <a href="containers.html#constant-time">constant time</a>, because <a href="qstringlist.html">QStringList</a> is <a href="shclass.html#implicitly-shared">implicitly shared</a>. This makes returning a <a href="qstringlist.html">QStringList</a> from a function very fast. If a shared instance is modified, it will be copied (copy-on-write), and that takes <a href="containers.html#linear-time">linear time</a>.</p>
 
118
<p>See also <a href="qlist.html#operator-eq">operator=</a>().</p>
 
119
<h3 class="fn"><a name="contains"></a>bool QStringList::contains ( const <a href="qstring.html">QString</a> &amp; <i>str</i>, <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a> <i>cs</i> = Qt::CaseSensitive ) const</h3>
 
120
<p>Returns true if the list contains the string <i>str</i>. Does a case insensitive search if <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a>, otherwise the search will be case insensitive.</p>
 
121
<h3 class="fn"><a name="filter"></a>QStringList QStringList::filter ( const <a href="qstring.html">QString</a> &amp; <i>str</i>, <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a> <i>cs</i> = Qt::CaseSensitive ) const</h3>
 
122
<p>Returns a list of all the strings containing the substring <i>str</i>.</p>
 
123
<p>If <i>cs</i> is <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitive</a> (the default), the string comparison is case sensitive; otherwise the comparison is case insensitive.</p>
 
124
<pre>&nbsp;   QStringList list;
 
125
    list &lt;&lt; &quot;Bill Murray&quot; &lt;&lt; &quot;John Doe&quot; &lt;&lt; &quot;Bill Clinton&quot;;
 
126
    list = list.filter(&quot;Bill&quot;);
 
127
    // list: [&quot;Bill Murray&quot;, &quot;Bill Clinton&quot;]</pre>
 
128
<p>See also <a href="qstring.html#contains">QString::contains</a>().</p>
 
129
<h3 class="fn"><a name="filter-2"></a>QStringList QStringList::filter ( const <a href="qregexp.html">QRegExp</a> &amp; <i>rx</i> ) const</h3>
 
130
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
131
<p>Returns a list of all the strings that match the regular expression <i>rx</i>.</p>
 
132
<h3 class="fn"><a name="indexOf"></a>int QStringList::indexOf ( const <a href="qregexp.html">QRegExp</a> &amp; <i>rx</i>, int <i>from</i> = 0 ) const</h3>
 
133
<p>Returns the index position of the first exact match of <i>rx</i> in the list, searching forward from index position <i>from</i>. Returns -1 if no item matched.</p>
 
134
<p>See also <a href="qstringlist.html#lastIndexOf">lastIndexOf</a>() and <a href="qregexp.html#exactMatch">QRegExp::exactMatch</a>().</p>
 
135
<h3 class="fn"><a name="join"></a><a href="qstring.html">QString</a> QStringList::join ( const <a href="qstring.html">QString</a> &amp; <i>sep</i> ) const</h3>
 
136
<p>Joins the all the string list's strings into a single string with each element separated by the string <i>sep</i> (which can be an empty string).</p>
 
137
<p>See also <a href="qstring.html#split">QString::split</a>().</p>
 
138
<h3 class="fn"><a name="lastIndexOf"></a>int QStringList::lastIndexOf ( const <a href="qregexp.html">QRegExp</a> &amp; <i>rx</i>, int <i>from</i> = -1 ) const</h3>
 
139
<p>Returns the index position of the last exact match of <i>rx</i> in the list, searching backward from index position <i>from</i>. If <i>from</i> is -1 (the default), the search starts at the last item. Returns -1 if no item matched.</p>
 
140
<p>See also <a href="qstringlist.html#indexOf">indexOf</a>() and <a href="qregexp.html#exactMatch">QRegExp::exactMatch</a>().</p>
 
141
<h3 class="fn"><a name="replaceInStrings"></a>QStringList &amp; QStringList::replaceInStrings ( const <a href="qstring.html">QString</a> &amp; <i>before</i>, const <a href="qstring.html">QString</a> &amp; <i>after</i>, <a href="qt.html#CaseSensitivity-enum">Qt::CaseSensitivity</a> <i>cs</i> = Qt::CaseSensitive )</h3>
 
142
<p>Returns a string list where every string has had the <i>before</i> text replaced with the <i>after</i> text wherever the <i>before</i> text is found. The <i>before</i> text is matched case-sensitively or not depending on the <i>cs</i> flag.</p>
 
143
<p>Example:</p>
 
144
<pre>&nbsp;   QStringList list;
 
145
    list &lt;&lt; &quot;alpha&quot; &lt;&lt; &quot;beta&quot; &lt;&lt; &quot;gamma&quot; &lt;&lt; &quot;epsilon&quot;;
 
146
    list.replace(&quot;a&quot;, &quot;o&quot;);
 
147
    // list == [&quot;olpho&quot;, &quot;beto&quot;, &quot;gommo&quot;, &quot;epsilon&quot;]</pre>
 
148
<p>See also <a href="qstring.html#replace">QString::replace</a>().</p>
 
149
<h3 class="fn"><a name="replaceInStrings-2"></a>QStringList &amp; QStringList::replaceInStrings ( const <a href="qregexp.html">QRegExp</a> &amp; <i>rx</i>, const <a href="qstring.html">QString</a> &amp; <i>after</i> )</h3>
 
150
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
151
<p>Replaces every occurrence of the regexp <i>rx</i>, in each of the string lists's strings, with <i>after</i>. Returns a reference to the string list.</p>
 
152
<p>Example:</p>
 
153
<pre>&nbsp;   QStringList list;
 
154
    list &lt;&lt; &quot;alpha&quot; &lt;&lt; &quot;beta&quot; &lt;&lt; &quot;gamma&quot; &lt;&lt; &quot;epsilon&quot;;
 
155
    list.replace(QRegExp(&quot;^a&quot;), &quot;o&quot;);
 
156
    // list == [&quot;olpha&quot;, &quot;beta&quot;, &quot;gamma&quot;, &quot;epsilon&quot;]</pre>
 
157
<p>For regular expressions that contain <a href="qregexp.html#capturing-parentheses">capturing parentheses</a>, occurrences of <b>\1</b>, <b>\2</b>, ..., in <i>after</i> are replaced with <i>rx</i>.cap(1), <i>rx</i>.cap(2), ...</p>
 
158
<p>Example:</p>
 
159
<pre>&nbsp;   QStringList list;
 
160
    list &lt;&lt; &quot;Bill Clinton&quot; &lt;&lt; &quot;Murray, Bill&quot;;
 
161
    list.replace(QRegExp(&quot;^(.*), (.*)$&quot;), &quot;\\2 \\1&quot;);
 
162
    // list == [&quot;Bill Clinton&quot;, &quot;Bill Murray&quot;]</pre>
 
163
<p>See also <a href="qlist.html#replace">replace</a>().</p>
 
164
<h3 class="fn"><a name="sort"></a>void QStringList::sort ()</h3>
 
165
<p>Sorts the list of strings in ascending order (case sensitively).</p>
 
166
<p>Sorting is performed using Qt's <a href="qtalgorithms.html#qSort">qSort</a>() algorithm, which operates in <a href="containers.html#linear-logarithmic-time">linear-logarithmic time</a>, i.e. O(<i>n</i> log <i>n</i>).</p>
 
167
<p>If you want to sort your strings in an arbitrary order, consider using a <a href="qmap.html">QMap</a>. For example, you could use a <a href="qmap.html">QMap</a>&lt;<a href="qstring.html">QString</a>, <a href="qstring.html">QString</a>&gt; to create a case-insensitive ordering (e.g. with the keys being lower-case versions of the strings, and the values being the strings), or a <a href="qmap.html">QMap</a>&lt;int, <a href="qstring.html">QString</a>&gt; to sort the strings by some integer index.</p>
 
168
<p>See also <a href="qtalgorithms.html#qSort">qSort</a>().</p>
 
169
<h3 class="fn"><a name="operator-2b"></a>QStringList QStringList::operator+ ( const QStringList &amp; <i>other</i> ) const</h3>
 
170
<p>Returns a string list that is the concatenation of this string list with the <i>other</i> string list.</p>
 
171
<p>See also <a href="qlist.html#append">append</a>().</p>
 
172
<h3 class="fn"><a name="operator-lt-lt"></a>QStringList &amp; QStringList::operator&lt;&lt; ( const <a href="qstring.html">QString</a> &amp; <i>str</i> )</h3>
 
173
<p>Appends string <i>str</i> to the string list and returns a reference to the string list.</p>
 
174
<p>See also <a href="qlist.html#append">append</a>().</p>
 
175
<h3 class="fn"><a name="operator-lt-lt-2"></a>QStringList &amp; QStringList::operator&lt;&lt; ( const QStringList &amp; <i>other</i> )</h3>
 
176
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
177
<p>Appends <i>other</i> to the string list and returns a reference to the string list.</p>
 
178
<hr />
 
179
<h2>Related Non-Members</h2>
 
180
<h3 class="fn"><a name="QMutableStringListIterator-typedef"></a>typedef QMutableStringListIterator</h3>
 
181
<p>The <a href="qstringlist.html#QStringListIterator-typedef">QStringListIterator</a> typedef provides a Java-style non-const iterator for <a href="qstringlist.html">QStringList</a>.</p>
 
182
<p><a href="qstringlist.html">QStringList</a> provides both <a href="containers.html#java-style-iterators">Java-style iterators</a> and <a href="containers.html#stl-style-iterators">STL-style iterators</a>. The Java-style non-const iterator is simply a typedef for <a href="qmutablelistiterator.html">QMutableListIterator</a>&lt;<a href="qstring.html">QString</a>&gt;.</p>
 
183
<p>See also <a href="qstringlist.html#QStringListIterator-typedef">QStringListIterator</a> and <a href="qlist-iterator.html">QStringList::iterator</a>.</p>
 
184
<h3 class="fn"><a name="QStringListIterator-typedef"></a>typedef QStringListIterator</h3>
 
185
<p>The QStringListIterator typedef provides a Java-style const iterator for <a href="qstringlist.html">QStringList</a>.</p>
 
186
<p><a href="qstringlist.html">QStringList</a> provides both <a href="containers.html#java-style-iterators">Java-style iterators</a> and <a href="containers.html#stl-style-iterators">STL-style iterators</a>. The Java-style const iterator is simply a typedef for <a href="qlistiterator.html">QListIterator</a>&lt;<a href="qstring.html">QString</a>&gt;.</p>
 
187
<p>See also <a href="qstringlist.html#QMutableStringListIterator-typedef">QMutableStringListIterator</a> and <a href="qlist-const-iterator.html">QStringList::const_iterator</a>.</p>
 
188
<h3 class="fn"><a name="operator-lt-lt-53"></a><a href="qdatastream.html">QDataStream</a> &amp; operator&lt;&lt; ( <a href="qdatastream.html">QDataStream</a> &amp; <i>out</i>, const QStringList &amp; <i>list</i> )</h3>
 
189
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
190
<p>Writes the string list <i>list</i> to stream <i>out</i>.</p>
 
191
<p>See also <a href="datastreamformat.html">Format of the QDataStream operators</a>.</p>
 
192
<h3 class="fn"><a name="operator-gt-gt-34"></a><a href="qdatastream.html">QDataStream</a> &amp; operator&gt;&gt; ( <a href="qdatastream.html">QDataStream</a> &amp; <i>in</i>, QStringList &amp; <i>list</i> )</h3>
 
193
<p>This is an overloaded member function, provided for convenience. It behaves essentially like the above function.</p>
 
194
<p>Reads a string list from stream <i>in</i> into <i>list</i>.</p>
 
195
<p>See also <a href="datastreamformat.html">Format of the QDataStream operators</a>.</p>
 
196
<p /><address><hr /><div align="center">
 
197
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
198
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
199
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
200
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
201
</tr></table></div></address></body>
 
202
</html>