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

« back to all changes in this revision

Viewing changes to doc/html/qbytearray.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /fasttmp/mkdist-qt-4.5.2-1245473805/qt-x11-opensource-src-4.5.2/src/corelib/tools/qbytearray.cpp -->
 
5
<!-- qbytearray.cpp -->
6
6
<head>
7
 
  <title>Qt 4.5: QByteArray Class Reference</title>
 
7
  <title>Qt 4.6: QByteArray Class Reference</title>
8
8
  <link href="classic.css" rel="stylesheet" type="text/css" />
9
9
</head>
10
10
<body>
 
11
<a name="//apple_ref/cpp/cl//QByteArray" />
11
12
<table border="0" cellpadding="0" cellspacing="0" width="100%">
12
13
<tr>
13
 
<td align="left" valign="top" width="32"><a href="http://qtsoftware.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
14
 
<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="namespaces.html"><font color="#004faf">All&nbsp;Namespaces</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="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
15
 
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">QByteArray Class Reference<br /><span class="small-subtitle">[<a href="qtcore.html">QtCore</a> module]</span>
 
14
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
 
15
<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="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
 
16
</tr></table><h1 class="title">QByteArray Class Reference<br /><span class="small-subtitle">[<a href="qtcore.html">QtCore</a> module]</span>
16
17
</h1>
17
18
<p>The QByteArray class provides an array of bytes. <a href="#details">More...</a></p>
18
19
<pre> #include &lt;QByteArray&gt;</pre><p>Inherited by <a href="q3cstring.html" class="compat">Q3CString</a>.</p>
19
 
<p><b>Note:</b> All the functions in this class are <a href="threads.html#reentrant">reentrant</a>.</p>
 
20
<p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
20
21
<ul>
21
22
<li><a href="qbytearray-members.html">List of all members, including inherited members</a></li>
22
23
<li><a href="qbytearray-qt3.html">Qt 3 support members</a></li>
23
24
</ul>
 
25
<hr />
24
26
<a name="public-functions"></a>
25
 
<h3>Public Functions</h3>
26
 
<ul>
27
 
<li><div class="fn"></div><b><a href="qbytearray.html#QByteArray">QByteArray</a></b> ()</li>
28
 
<li><div class="fn"></div><b><a href="qbytearray.html#QByteArray-2">QByteArray</a></b> ( const char * <i>str</i> )</li>
29
 
<li><div class="fn"></div><b><a href="qbytearray.html#QByteArray-3">QByteArray</a></b> ( const char * <i>data</i>, int <i>size</i> )</li>
30
 
<li><div class="fn"></div><b><a href="qbytearray.html#QByteArray-4">QByteArray</a></b> ( int <i>size</i>, char <i>ch</i> )</li>
31
 
<li><div class="fn"></div><b><a href="qbytearray.html#QByteArray-5">QByteArray</a></b> ( const QByteArray &amp; <i>other</i> )</li>
32
 
<li><div class="fn"></div><b><a href="qbytearray.html#dtor.QByteArray">~QByteArray</a></b> ()</li>
33
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#append">append</a></b> ( const QByteArray &amp; <i>ba</i> )</li>
34
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#append-2">append</a></b> ( const QString &amp; <i>str</i> )</li>
35
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#append-3">append</a></b> ( const char * <i>str</i> )</li>
36
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#append-4">append</a></b> ( const char * <i>str</i>, int <i>len</i> )</li>
37
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#append-5">append</a></b> ( char <i>ch</i> )</li>
38
 
<li><div class="fn"></div>char <b><a href="qbytearray.html#at">at</a></b> ( int <i>i</i> ) const</li>
39
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#capacity">capacity</a></b> () const</li>
40
 
<li><div class="fn"></div>void <b><a href="qbytearray.html#chop">chop</a></b> ( int <i>n</i> )</li>
41
 
<li><div class="fn"></div>void <b><a href="qbytearray.html#clear">clear</a></b> ()</li>
42
 
<li><div class="fn"></div>const char * <b><a href="qbytearray.html#constData">constData</a></b> () const</li>
43
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#contains">contains</a></b> ( const QByteArray &amp; <i>ba</i> ) const</li>
44
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#contains-2">contains</a></b> ( const char * <i>str</i> ) const</li>
45
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#contains-3">contains</a></b> ( char <i>ch</i> ) const</li>
46
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#count">count</a></b> ( const QByteArray &amp; <i>ba</i> ) const</li>
47
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#count-2">count</a></b> ( const char * <i>str</i> ) const</li>
48
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#count-3">count</a></b> ( char <i>ch</i> ) const</li>
49
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#count-4">count</a></b> () const</li>
50
 
<li><div class="fn"></div>char * <b><a href="qbytearray.html#data">data</a></b> ()</li>
51
 
<li><div class="fn"></div>const char * <b><a href="qbytearray.html#data-2">data</a></b> () const</li>
52
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#endsWith">endsWith</a></b> ( const QByteArray &amp; <i>ba</i> ) const</li>
53
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#endsWith-2">endsWith</a></b> ( const char * <i>str</i> ) const</li>
54
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#endsWith-3">endsWith</a></b> ( char <i>ch</i> ) const</li>
55
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#fill">fill</a></b> ( char <i>ch</i>, int <i>size</i> = -1 )</li>
56
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#indexOf">indexOf</a></b> ( const QByteArray &amp; <i>ba</i>, int <i>from</i> = 0 ) const</li>
57
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#indexOf-2">indexOf</a></b> ( const QString &amp; <i>str</i>, int <i>from</i> = 0 ) const</li>
58
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#indexOf-3">indexOf</a></b> ( const char * <i>str</i>, int <i>from</i> = 0 ) const</li>
59
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#indexOf-4">indexOf</a></b> ( char <i>ch</i>, int <i>from</i> = 0 ) const</li>
60
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#insert">insert</a></b> ( int <i>i</i>, const QByteArray &amp; <i>ba</i> )</li>
61
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#insert-2">insert</a></b> ( int <i>i</i>, const QString &amp; <i>str</i> )</li>
62
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#insert-3">insert</a></b> ( int <i>i</i>, const char * <i>str</i> )</li>
63
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#insert-4">insert</a></b> ( int <i>i</i>, char <i>ch</i> )</li>
64
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#isEmpty">isEmpty</a></b> () const</li>
65
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#isNull">isNull</a></b> () const</li>
66
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#lastIndexOf">lastIndexOf</a></b> ( const QByteArray &amp; <i>ba</i>, int <i>from</i> = -1 ) const</li>
67
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#lastIndexOf-2">lastIndexOf</a></b> ( const QString &amp; <i>str</i>, int <i>from</i> = -1 ) const</li>
68
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#lastIndexOf-3">lastIndexOf</a></b> ( const char * <i>str</i>, int <i>from</i> = -1 ) const</li>
69
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#lastIndexOf-4">lastIndexOf</a></b> ( char <i>ch</i>, int <i>from</i> = -1 ) const</li>
70
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#left">left</a></b> ( int <i>len</i> ) const</li>
71
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#leftJustified">leftJustified</a></b> ( int <i>width</i>, char <i>fill</i> = ' ', bool <i>truncate</i> = false ) const</li>
72
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#length">length</a></b> () const</li>
73
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#mid">mid</a></b> ( int <i>pos</i>, int <i>len</i> = -1 ) const</li>
74
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#prepend">prepend</a></b> ( const QByteArray &amp; <i>ba</i> )</li>
75
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#prepend-2">prepend</a></b> ( const char * <i>str</i> )</li>
76
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#prepend-3">prepend</a></b> ( char <i>ch</i> )</li>
77
 
<li><div class="fn"></div>void <b><a href="qbytearray.html#push_back">push_back</a></b> ( const QByteArray &amp; <i>other</i> )</li>
78
 
<li><div class="fn"></div>void <b><a href="qbytearray.html#push_back-2">push_back</a></b> ( const char * <i>str</i> )</li>
79
 
<li><div class="fn"></div>void <b><a href="qbytearray.html#push_back-3">push_back</a></b> ( char <i>ch</i> )</li>
80
 
<li><div class="fn"></div>void <b><a href="qbytearray.html#push_front">push_front</a></b> ( const QByteArray &amp; <i>other</i> )</li>
81
 
<li><div class="fn"></div>void <b><a href="qbytearray.html#push_front-2">push_front</a></b> ( const char * <i>str</i> )</li>
82
 
<li><div class="fn"></div>void <b><a href="qbytearray.html#push_front-3">push_front</a></b> ( char <i>ch</i> )</li>
83
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#remove">remove</a></b> ( int <i>pos</i>, int <i>len</i> )</li>
84
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#repeated">repeated</a></b> ( int <i>times</i> ) const</li>
85
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#replace">replace</a></b> ( int <i>pos</i>, int <i>len</i>, const QByteArray &amp; <i>after</i> )</li>
86
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#replace-2">replace</a></b> ( int <i>pos</i>, int <i>len</i>, const char * <i>after</i> )</li>
87
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#replace-3">replace</a></b> ( const QByteArray &amp; <i>before</i>, const QByteArray &amp; <i>after</i> )</li>
88
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#replace-4">replace</a></b> ( const char * <i>before</i>, const QByteArray &amp; <i>after</i> )</li>
89
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#replace-5">replace</a></b> ( const char * <i>before</i>, int <i>bsize</i>, const char * <i>after</i>, int <i>asize</i> )</li>
90
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#replace-6">replace</a></b> ( const QByteArray &amp; <i>before</i>, const char * <i>after</i> )</li>
91
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#replace-7">replace</a></b> ( const QString &amp; <i>before</i>, const QByteArray &amp; <i>after</i> )</li>
92
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#replace-8">replace</a></b> ( const QString &amp; <i>before</i>, const char * <i>after</i> )</li>
93
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#replace-9">replace</a></b> ( const char * <i>before</i>, const char * <i>after</i> )</li>
94
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#replace-10">replace</a></b> ( char <i>before</i>, const QByteArray &amp; <i>after</i> )</li>
95
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#replace-11">replace</a></b> ( char <i>before</i>, const QString &amp; <i>after</i> )</li>
96
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#replace-12">replace</a></b> ( char <i>before</i>, const char * <i>after</i> )</li>
97
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#replace-13">replace</a></b> ( char <i>before</i>, char <i>after</i> )</li>
98
 
<li><div class="fn"></div>void <b><a href="qbytearray.html#reserve">reserve</a></b> ( int <i>size</i> )</li>
99
 
<li><div class="fn"></div>void <b><a href="qbytearray.html#resize">resize</a></b> ( int <i>size</i> )</li>
100
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#right">right</a></b> ( int <i>len</i> ) const</li>
101
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#rightJustified">rightJustified</a></b> ( int <i>width</i>, char <i>fill</i> = ' ', bool <i>truncate</i> = false ) const</li>
102
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#setNum">setNum</a></b> ( int <i>n</i>, int <i>base</i> = 10 )</li>
103
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#setNum-2">setNum</a></b> ( uint <i>n</i>, int <i>base</i> = 10 )</li>
104
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#setNum-3">setNum</a></b> ( short <i>n</i>, int <i>base</i> = 10 )</li>
105
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#setNum-4">setNum</a></b> ( ushort <i>n</i>, int <i>base</i> = 10 )</li>
106
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#setNum-5">setNum</a></b> ( qlonglong <i>n</i>, int <i>base</i> = 10 )</li>
107
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#setNum-6">setNum</a></b> ( qulonglong <i>n</i>, int <i>base</i> = 10 )</li>
108
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#setNum-7">setNum</a></b> ( double <i>n</i>, char <i>f</i> = 'g', int <i>prec</i> = 6 )</li>
109
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#setNum-8">setNum</a></b> ( float <i>n</i>, char <i>f</i> = 'g', int <i>prec</i> = 6 )</li>
110
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#simplified">simplified</a></b> () const</li>
111
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#size">size</a></b> () const</li>
112
 
<li><div class="fn"></div>QList&lt;QByteArray&gt; <b><a href="qbytearray.html#split">split</a></b> ( char <i>sep</i> ) const</li>
113
 
<li><div class="fn"></div>void <b><a href="qbytearray.html#squeeze">squeeze</a></b> ()</li>
114
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#startsWith">startsWith</a></b> ( const QByteArray &amp; <i>ba</i> ) const</li>
115
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#startsWith-2">startsWith</a></b> ( const char * <i>str</i> ) const</li>
116
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#startsWith-3">startsWith</a></b> ( char <i>ch</i> ) const</li>
117
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#toBase64">toBase64</a></b> () const</li>
118
 
<li><div class="fn"></div>double <b><a href="qbytearray.html#toDouble">toDouble</a></b> ( bool * <i>ok</i> = 0 ) const</li>
119
 
<li><div class="fn"></div>float <b><a href="qbytearray.html#toFloat">toFloat</a></b> ( bool * <i>ok</i> = 0 ) const</li>
120
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#toHex">toHex</a></b> () const</li>
121
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#toInt">toInt</a></b> ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</li>
122
 
<li><div class="fn"></div>long <b><a href="qbytearray.html#toLong">toLong</a></b> ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</li>
123
 
<li><div class="fn"></div>qlonglong <b><a href="qbytearray.html#toLongLong">toLongLong</a></b> ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</li>
124
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#toLower">toLower</a></b> () const</li>
125
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#toPercentEncoding">toPercentEncoding</a></b> ( const QByteArray &amp; <i>exclude</i> = QByteArray(), const QByteArray &amp; <i>include</i> = QByteArray(), char <i>percent</i> = '%' ) const</li>
126
 
<li><div class="fn"></div>short <b><a href="qbytearray.html#toShort">toShort</a></b> ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</li>
127
 
<li><div class="fn"></div>uint <b><a href="qbytearray.html#toUInt">toUInt</a></b> ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</li>
128
 
<li><div class="fn"></div>ulong <b><a href="qbytearray.html#toULong">toULong</a></b> ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</li>
129
 
<li><div class="fn"></div>qulonglong <b><a href="qbytearray.html#toULongLong">toULongLong</a></b> ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</li>
130
 
<li><div class="fn"></div>ushort <b><a href="qbytearray.html#toUShort">toUShort</a></b> ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</li>
131
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#toUpper">toUpper</a></b> () const</li>
132
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#trimmed">trimmed</a></b> () const</li>
133
 
<li><div class="fn"></div>void <b><a href="qbytearray.html#truncate">truncate</a></b> ( int <i>pos</i> )</li>
134
 
<li><div class="fn"></div><b><a href="qbytearray.html#operator-const-char--2a">operator const char *</a></b> () const</li>
135
 
<li><div class="fn"></div><b><a href="qbytearray.html#operator-const-void--2a">operator const void *</a></b> () const</li>
136
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-not-eq">operator!=</a></b> ( const QString &amp; <i>str</i> ) const</li>
137
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#operator-2b-eq">operator+=</a></b> ( const QByteArray &amp; <i>ba</i> )</li>
138
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#operator-2b-eq-2">operator+=</a></b> ( const QString &amp; <i>str</i> )</li>
139
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#operator-2b-eq-3">operator+=</a></b> ( const char * <i>str</i> )</li>
140
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#operator-2b-eq-4">operator+=</a></b> ( char <i>ch</i> )</li>
141
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-lt">operator&lt;</a></b> ( const QString &amp; <i>str</i> ) const</li>
142
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-lt-eq">operator&lt;=</a></b> ( const QString &amp; <i>str</i> ) const</li>
143
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#operator-eq">operator=</a></b> ( const QByteArray &amp; <i>other</i> )</li>
144
 
<li><div class="fn"></div>QByteArray &amp; <b><a href="qbytearray.html#operator-eq-2">operator=</a></b> ( const char * <i>str</i> )</li>
145
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-eq-eq">operator==</a></b> ( const QString &amp; <i>str</i> ) const</li>
146
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-gt">operator&gt;</a></b> ( const QString &amp; <i>str</i> ) const</li>
147
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-gt-eq">operator&gt;=</a></b> ( const QString &amp; <i>str</i> ) const</li>
148
 
<li><div class="fn"></div>QByteRef <b><a href="qbytearray.html#operator-5b-5d">operator[]</a></b> ( int <i>i</i> )</li>
149
 
<li><div class="fn"></div>char <b><a href="qbytearray.html#operator-5b-5d-2">operator[]</a></b> ( int <i>i</i> ) const</li>
150
 
<li><div class="fn"></div>QByteRef <b><a href="qbytearray.html#operator-5b-5d-3">operator[]</a></b> ( uint <i>i</i> )</li>
151
 
<li><div class="fn"></div>char <b><a href="qbytearray.html#operator-5b-5d-4">operator[]</a></b> ( uint <i>i</i> ) const</li>
152
 
</ul>
 
27
<h2>Public Functions</h2>
 
28
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
29
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#QByteArray">QByteArray</a></b> ()</td></tr>
 
30
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#QByteArray-2">QByteArray</a></b> ( const char * <i>str</i> )</td></tr>
 
31
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#QByteArray-3">QByteArray</a></b> ( const char * <i>data</i>, int <i>size</i> )</td></tr>
 
32
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#QByteArray-4">QByteArray</a></b> ( int <i>size</i>, char <i>ch</i> )</td></tr>
 
33
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#QByteArray-6">QByteArray</a></b> ( const QByteArray &amp; <i>other</i> )</td></tr>
 
34
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#dtor.QByteArray">~QByteArray</a></b> ()</td></tr>
 
35
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#append">append</a></b> ( const QByteArray &amp; <i>ba</i> )</td></tr>
 
36
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#append-2">append</a></b> ( const QString &amp; <i>str</i> )</td></tr>
 
37
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#append-3">append</a></b> ( const char * <i>str</i> )</td></tr>
 
38
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#append-4">append</a></b> ( const char * <i>str</i>, int <i>len</i> )</td></tr>
 
39
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#append-5">append</a></b> ( char <i>ch</i> )</td></tr>
 
40
<tr><td class="memItemLeft" align="right" valign="top">char </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#at">at</a></b> ( int <i>i</i> ) const</td></tr>
 
41
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#capacity">capacity</a></b> () const</td></tr>
 
42
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#chop">chop</a></b> ( int <i>n</i> )</td></tr>
 
43
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#clear">clear</a></b> ()</td></tr>
 
44
<tr><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#constData">constData</a></b> () const</td></tr>
 
45
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#contains">contains</a></b> ( const QByteArray &amp; <i>ba</i> ) const</td></tr>
 
46
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#contains-2">contains</a></b> ( const char * <i>str</i> ) const</td></tr>
 
47
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#contains-3">contains</a></b> ( char <i>ch</i> ) const</td></tr>
 
48
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#count">count</a></b> ( const QByteArray &amp; <i>ba</i> ) const</td></tr>
 
49
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#count-2">count</a></b> ( const char * <i>str</i> ) const</td></tr>
 
50
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#count-3">count</a></b> ( char <i>ch</i> ) const</td></tr>
 
51
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#count-4">count</a></b> () const</td></tr>
 
52
<tr><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#data">data</a></b> ()</td></tr>
 
53
<tr><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#data-2">data</a></b> () const</td></tr>
 
54
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#endsWith">endsWith</a></b> ( const QByteArray &amp; <i>ba</i> ) const</td></tr>
 
55
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#endsWith-2">endsWith</a></b> ( const char * <i>str</i> ) const</td></tr>
 
56
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#endsWith-3">endsWith</a></b> ( char <i>ch</i> ) const</td></tr>
 
57
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#fill">fill</a></b> ( char <i>ch</i>, int <i>size</i> = -1 )</td></tr>
 
58
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#indexOf">indexOf</a></b> ( const QByteArray &amp; <i>ba</i>, int <i>from</i> = 0 ) const</td></tr>
 
59
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#indexOf-2">indexOf</a></b> ( const QString &amp; <i>str</i>, int <i>from</i> = 0 ) const</td></tr>
 
60
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#indexOf-3">indexOf</a></b> ( const char * <i>str</i>, int <i>from</i> = 0 ) const</td></tr>
 
61
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#indexOf-4">indexOf</a></b> ( char <i>ch</i>, int <i>from</i> = 0 ) const</td></tr>
 
62
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#insert">insert</a></b> ( int <i>i</i>, const QByteArray &amp; <i>ba</i> )</td></tr>
 
63
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#insert-2">insert</a></b> ( int <i>i</i>, const QString &amp; <i>str</i> )</td></tr>
 
64
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#insert-3">insert</a></b> ( int <i>i</i>, const char * <i>str</i> )</td></tr>
 
65
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#insert-4">insert</a></b> ( int <i>i</i>, const char * <i>str</i>, int <i>len</i> )</td></tr>
 
66
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#insert-5">insert</a></b> ( int <i>i</i>, char <i>ch</i> )</td></tr>
 
67
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#isEmpty">isEmpty</a></b> () const</td></tr>
 
68
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#isNull">isNull</a></b> () const</td></tr>
 
69
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#lastIndexOf">lastIndexOf</a></b> ( const QByteArray &amp; <i>ba</i>, int <i>from</i> = -1 ) const</td></tr>
 
70
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#lastIndexOf-2">lastIndexOf</a></b> ( const QString &amp; <i>str</i>, int <i>from</i> = -1 ) const</td></tr>
 
71
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#lastIndexOf-3">lastIndexOf</a></b> ( const char * <i>str</i>, int <i>from</i> = -1 ) const</td></tr>
 
72
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#lastIndexOf-4">lastIndexOf</a></b> ( char <i>ch</i>, int <i>from</i> = -1 ) const</td></tr>
 
73
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#left">left</a></b> ( int <i>len</i> ) const</td></tr>
 
74
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#leftJustified">leftJustified</a></b> ( int <i>width</i>, char <i>fill</i> = ' ', bool <i>truncate</i> = false ) const</td></tr>
 
75
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#length">length</a></b> () const</td></tr>
 
76
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#mid">mid</a></b> ( int <i>pos</i>, int <i>len</i> = -1 ) const</td></tr>
 
77
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#prepend">prepend</a></b> ( const QByteArray &amp; <i>ba</i> )</td></tr>
 
78
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#prepend-2">prepend</a></b> ( const char * <i>str</i> )</td></tr>
 
79
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#prepend-3">prepend</a></b> ( const char * <i>str</i>, int <i>len</i> )</td></tr>
 
80
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#prepend-4">prepend</a></b> ( char <i>ch</i> )</td></tr>
 
81
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#push_back">push_back</a></b> ( const QByteArray &amp; <i>other</i> )</td></tr>
 
82
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#push_back-2">push_back</a></b> ( const char * <i>str</i> )</td></tr>
 
83
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#push_back-3">push_back</a></b> ( char <i>ch</i> )</td></tr>
 
84
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#push_front">push_front</a></b> ( const QByteArray &amp; <i>other</i> )</td></tr>
 
85
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#push_front-2">push_front</a></b> ( const char * <i>str</i> )</td></tr>
 
86
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#push_front-3">push_front</a></b> ( char <i>ch</i> )</td></tr>
 
87
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#remove">remove</a></b> ( int <i>pos</i>, int <i>len</i> )</td></tr>
 
88
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#repeated">repeated</a></b> ( int <i>times</i> ) const</td></tr>
 
89
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#replace">replace</a></b> ( int <i>pos</i>, int <i>len</i>, const QByteArray &amp; <i>after</i> )</td></tr>
 
90
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#replace-2">replace</a></b> ( int <i>pos</i>, int <i>len</i>, const char * <i>after</i> )</td></tr>
 
91
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#replace-3">replace</a></b> ( const QByteArray &amp; <i>before</i>, const QByteArray &amp; <i>after</i> )</td></tr>
 
92
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#replace-4">replace</a></b> ( const char * <i>before</i>, const QByteArray &amp; <i>after</i> )</td></tr>
 
93
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#replace-5">replace</a></b> ( const char * <i>before</i>, int <i>bsize</i>, const char * <i>after</i>, int <i>asize</i> )</td></tr>
 
94
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#replace-6">replace</a></b> ( const QByteArray &amp; <i>before</i>, const char * <i>after</i> )</td></tr>
 
95
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#replace-7">replace</a></b> ( const QString &amp; <i>before</i>, const QByteArray &amp; <i>after</i> )</td></tr>
 
96
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#replace-8">replace</a></b> ( const QString &amp; <i>before</i>, const char * <i>after</i> )</td></tr>
 
97
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#replace-9">replace</a></b> ( const char * <i>before</i>, const char * <i>after</i> )</td></tr>
 
98
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#replace-10">replace</a></b> ( char <i>before</i>, const QByteArray &amp; <i>after</i> )</td></tr>
 
99
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#replace-11">replace</a></b> ( char <i>before</i>, const QString &amp; <i>after</i> )</td></tr>
 
100
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#replace-12">replace</a></b> ( char <i>before</i>, const char * <i>after</i> )</td></tr>
 
101
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#replace-13">replace</a></b> ( char <i>before</i>, char <i>after</i> )</td></tr>
 
102
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#reserve">reserve</a></b> ( int <i>size</i> )</td></tr>
 
103
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#resize">resize</a></b> ( int <i>size</i> )</td></tr>
 
104
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#right">right</a></b> ( int <i>len</i> ) const</td></tr>
 
105
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#rightJustified">rightJustified</a></b> ( int <i>width</i>, char <i>fill</i> = ' ', bool <i>truncate</i> = false ) const</td></tr>
 
106
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#setNum">setNum</a></b> ( int <i>n</i>, int <i>base</i> = 10 )</td></tr>
 
107
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#setNum-2">setNum</a></b> ( uint <i>n</i>, int <i>base</i> = 10 )</td></tr>
 
108
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#setNum-3">setNum</a></b> ( short <i>n</i>, int <i>base</i> = 10 )</td></tr>
 
109
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#setNum-4">setNum</a></b> ( ushort <i>n</i>, int <i>base</i> = 10 )</td></tr>
 
110
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#setNum-5">setNum</a></b> ( qlonglong <i>n</i>, int <i>base</i> = 10 )</td></tr>
 
111
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#setNum-6">setNum</a></b> ( qulonglong <i>n</i>, int <i>base</i> = 10 )</td></tr>
 
112
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#setNum-7">setNum</a></b> ( double <i>n</i>, char <i>f</i> = 'g', int <i>prec</i> = 6 )</td></tr>
 
113
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#setNum-8">setNum</a></b> ( float <i>n</i>, char <i>f</i> = 'g', int <i>prec</i> = 6 )</td></tr>
 
114
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#simplified">simplified</a></b> () const</td></tr>
 
115
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#size">size</a></b> () const</td></tr>
 
116
<tr><td class="memItemLeft" align="right" valign="top">QList&lt;QByteArray&gt; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#split">split</a></b> ( char <i>sep</i> ) const</td></tr>
 
117
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#squeeze">squeeze</a></b> ()</td></tr>
 
118
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#startsWith">startsWith</a></b> ( const QByteArray &amp; <i>ba</i> ) const</td></tr>
 
119
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#startsWith-2">startsWith</a></b> ( const char * <i>str</i> ) const</td></tr>
 
120
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#startsWith-3">startsWith</a></b> ( char <i>ch</i> ) const</td></tr>
 
121
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#toBase64">toBase64</a></b> () const</td></tr>
 
122
<tr><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#toDouble">toDouble</a></b> ( bool * <i>ok</i> = 0 ) const</td></tr>
 
123
<tr><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#toFloat">toFloat</a></b> ( bool * <i>ok</i> = 0 ) const</td></tr>
 
124
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#toHex">toHex</a></b> () const</td></tr>
 
125
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#toInt">toInt</a></b> ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</td></tr>
 
126
<tr><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#toLong">toLong</a></b> ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</td></tr>
 
127
<tr><td class="memItemLeft" align="right" valign="top">qlonglong </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#toLongLong">toLongLong</a></b> ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</td></tr>
 
128
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#toLower">toLower</a></b> () const</td></tr>
 
129
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#toPercentEncoding">toPercentEncoding</a></b> ( const QByteArray &amp; <i>exclude</i> = QByteArray(), const QByteArray &amp; <i>include</i> = QByteArray(), char <i>percent</i> = '%' ) const</td></tr>
 
130
<tr><td class="memItemLeft" align="right" valign="top">short </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#toShort">toShort</a></b> ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</td></tr>
 
131
<tr><td class="memItemLeft" align="right" valign="top">uint </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#toUInt">toUInt</a></b> ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</td></tr>
 
132
<tr><td class="memItemLeft" align="right" valign="top">ulong </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#toULong">toULong</a></b> ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</td></tr>
 
133
<tr><td class="memItemLeft" align="right" valign="top">qulonglong </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#toULongLong">toULongLong</a></b> ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</td></tr>
 
134
<tr><td class="memItemLeft" align="right" valign="top">ushort </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#toUShort">toUShort</a></b> ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</td></tr>
 
135
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#toUpper">toUpper</a></b> () const</td></tr>
 
136
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#trimmed">trimmed</a></b> () const</td></tr>
 
137
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#truncate">truncate</a></b> ( int <i>pos</i> )</td></tr>
 
138
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-const-char--2a">operator const char *</a></b> () const</td></tr>
 
139
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-const-void--2a">operator const void *</a></b> () const</td></tr>
 
140
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-not-eq">operator!=</a></b> ( const QString &amp; <i>str</i> ) const</td></tr>
 
141
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-2b-eq">operator+=</a></b> ( const QByteArray &amp; <i>ba</i> )</td></tr>
 
142
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-2b-eq-2">operator+=</a></b> ( const QString &amp; <i>str</i> )</td></tr>
 
143
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-2b-eq-3">operator+=</a></b> ( const char * <i>str</i> )</td></tr>
 
144
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-2b-eq-4">operator+=</a></b> ( char <i>ch</i> )</td></tr>
 
145
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-lt">operator&lt;</a></b> ( const QString &amp; <i>str</i> ) const</td></tr>
 
146
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-lt-eq">operator&lt;=</a></b> ( const QString &amp; <i>str</i> ) const</td></tr>
 
147
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-eq">operator=</a></b> ( const QByteArray &amp; <i>other</i> )</td></tr>
 
148
<tr><td class="memItemLeft" align="right" valign="top">QByteArray &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-eq-2">operator=</a></b> ( const char * <i>str</i> )</td></tr>
 
149
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-eq-eq">operator==</a></b> ( const QString &amp; <i>str</i> ) const</td></tr>
 
150
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-gt">operator&gt;</a></b> ( const QString &amp; <i>str</i> ) const</td></tr>
 
151
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-gt-eq">operator&gt;=</a></b> ( const QString &amp; <i>str</i> ) const</td></tr>
 
152
<tr><td class="memItemLeft" align="right" valign="top">QByteRef </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-5b-5d">operator[]</a></b> ( int <i>i</i> )</td></tr>
 
153
<tr><td class="memItemLeft" align="right" valign="top">char </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-5b-5d-2">operator[]</a></b> ( int <i>i</i> ) const</td></tr>
 
154
<tr><td class="memItemLeft" align="right" valign="top">QByteRef </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-5b-5d-3">operator[]</a></b> ( uint <i>i</i> )</td></tr>
 
155
<tr><td class="memItemLeft" align="right" valign="top">char </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-5b-5d-4">operator[]</a></b> ( uint <i>i</i> ) const</td></tr>
 
156
</table>
 
157
<hr />
153
158
<a name="static-public-members"></a>
154
 
<h3>Static Public Members</h3>
155
 
<ul>
156
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#fromBase64">fromBase64</a></b> ( const QByteArray &amp; <i>base64</i> )</li>
157
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#fromHex">fromHex</a></b> ( const QByteArray &amp; <i>hexEncoded</i> )</li>
158
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#fromPercentEncoding">fromPercentEncoding</a></b> ( const QByteArray &amp; <i>input</i>, char <i>percent</i> = '%' )</li>
159
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#fromRawData">fromRawData</a></b> ( const char * <i>data</i>, int <i>size</i> )</li>
160
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#number">number</a></b> ( int <i>n</i>, int <i>base</i> = 10 )</li>
161
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#number-2">number</a></b> ( uint <i>n</i>, int <i>base</i> = 10 )</li>
162
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#number-3">number</a></b> ( qlonglong <i>n</i>, int <i>base</i> = 10 )</li>
163
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#number-4">number</a></b> ( qulonglong <i>n</i>, int <i>base</i> = 10 )</li>
164
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#number-5">number</a></b> ( double <i>n</i>, char <i>f</i> = 'g', int <i>prec</i> = 6 )</li>
165
 
</ul>
 
159
<h2>Static Public Members</h2>
 
160
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
161
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#fromBase64">fromBase64</a></b> ( const QByteArray &amp; <i>base64</i> )</td></tr>
 
162
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#fromHex">fromHex</a></b> ( const QByteArray &amp; <i>hexEncoded</i> )</td></tr>
 
163
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#fromPercentEncoding">fromPercentEncoding</a></b> ( const QByteArray &amp; <i>input</i>, char <i>percent</i> = '%' )</td></tr>
 
164
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#fromRawData">fromRawData</a></b> ( const char * <i>data</i>, int <i>size</i> )</td></tr>
 
165
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#number">number</a></b> ( int <i>n</i>, int <i>base</i> = 10 )</td></tr>
 
166
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#number-2">number</a></b> ( uint <i>n</i>, int <i>base</i> = 10 )</td></tr>
 
167
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#number-3">number</a></b> ( qlonglong <i>n</i>, int <i>base</i> = 10 )</td></tr>
 
168
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#number-4">number</a></b> ( qulonglong <i>n</i>, int <i>base</i> = 10 )</td></tr>
 
169
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#number-5">number</a></b> ( double <i>n</i>, char <i>f</i> = 'g', int <i>prec</i> = 6 )</td></tr>
 
170
</table>
 
171
<hr />
166
172
<a name="related-non-members"></a>
167
 
<h3>Related Non-Members</h3>
168
 
<ul>
169
 
<li><div class="fn"></div>quint16 <b><a href="qbytearray.html#qChecksum">qChecksum</a></b> ( const char * <i>data</i>, uint <i>len</i> )</li>
170
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#qCompress">qCompress</a></b> ( const QByteArray &amp; <i>data</i>, int <i>compressionLevel</i> = -1 )</li>
171
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#qCompress-2">qCompress</a></b> ( const uchar * <i>data</i>, int <i>nbytes</i>, int <i>compressionLevel</i> = -1 )</li>
172
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#qUncompress">qUncompress</a></b> ( const QByteArray &amp; <i>data</i> )</li>
173
 
<li><div class="fn"></div>QByteArray <b><a href="qbytearray.html#qUncompress-2">qUncompress</a></b> ( const uchar * <i>data</i>, int <i>nbytes</i> )</li>
174
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#qsnprintf">qsnprintf</a></b> ( char * <i>str</i>, size_t <i>n</i>, const char * <i>fmt</i>, ... )</li>
175
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#qstrcmp">qstrcmp</a></b> ( const char * <i>str1</i>, const char * <i>str2</i> )</li>
176
 
<li><div class="fn"></div>char * <b><a href="qbytearray.html#qstrcpy">qstrcpy</a></b> ( char * <i>dst</i>, const char * <i>src</i> )</li>
177
 
<li><div class="fn"></div>char * <b><a href="qbytearray.html#qstrdup">qstrdup</a></b> ( const char * <i>src</i> )</li>
178
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#qstricmp">qstricmp</a></b> ( const char * <i>str1</i>, const char * <i>str2</i> )</li>
179
 
<li><div class="fn"></div>uint <b><a href="qbytearray.html#qstrlen">qstrlen</a></b> ( const char * <i>str</i> )</li>
180
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#qstrncmp">qstrncmp</a></b> ( const char * <i>str1</i>, const char * <i>str2</i>, uint <i>len</i> )</li>
181
 
<li><div class="fn"></div>char * <b><a href="qbytearray.html#qstrncpy">qstrncpy</a></b> ( char * <i>dst</i>, const char * <i>src</i>, uint <i>len</i> )</li>
182
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#qstrnicmp">qstrnicmp</a></b> ( const char * <i>str1</i>, const char * <i>str2</i>, uint <i>len</i> )</li>
183
 
<li><div class="fn"></div>uint <b><a href="qbytearray.html#qstrnlen">qstrnlen</a></b> ( const char * <i>str</i>, uint <i>maxlen</i> )</li>
184
 
<li><div class="fn"></div>int <b><a href="qbytearray.html#qvsnprintf">qvsnprintf</a></b> ( char * <i>str</i>, size_t <i>n</i>, const char * <i>fmt</i>, va_list <i>ap</i> )</li>
185
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-not-eq-52">operator!=</a></b> ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</li>
186
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-not-eq-53">operator!=</a></b> ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</li>
187
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-not-eq-54">operator!=</a></b> ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</li>
188
 
<li><div class="fn"></div>const QByteArray <b><a href="qbytearray.html#operator-2b-38">operator+</a></b> ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</li>
189
 
<li><div class="fn"></div>const QByteArray <b><a href="qbytearray.html#operator-2b-39">operator+</a></b> ( const QByteArray &amp; <i>a1</i>, char <i>a2</i> )</li>
190
 
<li><div class="fn"></div>const QByteArray <b><a href="qbytearray.html#operator-2b-40">operator+</a></b> ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</li>
191
 
<li><div class="fn"></div>const QByteArray <b><a href="qbytearray.html#operator-2b-41">operator+</a></b> ( char <i>a1</i>, const QByteArray &amp; <i>a2</i> )</li>
192
 
<li><div class="fn"></div>const QByteArray <b><a href="qbytearray.html#operator-2b-11">operator+</a></b> ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</li>
193
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-lt-19">operator&lt;</a></b> ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</li>
194
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-lt-20">operator&lt;</a></b> ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</li>
195
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-lt-21">operator&lt;</a></b> ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</li>
196
 
<li><div class="fn"></div>QDataStream &amp; <b><a href="qbytearray.html#operator-lt-lt-92">operator&lt;&lt;</a></b> ( QDataStream &amp; <i>out</i>, const QByteArray &amp; <i>ba</i> )</li>
197
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-lt-eq-14">operator&lt;=</a></b> ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</li>
198
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-lt-eq-15">operator&lt;=</a></b> ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</li>
199
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-lt-eq-16">operator&lt;=</a></b> ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</li>
200
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-eq-eq-74">operator==</a></b> ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</li>
201
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-eq-eq-75">operator==</a></b> ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</li>
202
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-eq-eq-76">operator==</a></b> ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</li>
203
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-gt-14">operator&gt;</a></b> ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</li>
204
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-gt-15">operator&gt;</a></b> ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</li>
205
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-gt-16">operator&gt;</a></b> ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</li>
206
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-gt-eq-14">operator&gt;=</a></b> ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</li>
207
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-gt-eq-15">operator&gt;=</a></b> ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</li>
208
 
<li><div class="fn"></div>bool <b><a href="qbytearray.html#operator-gt-eq-16">operator&gt;=</a></b> ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</li>
209
 
<li><div class="fn"></div>QDataStream &amp; <b><a href="qbytearray.html#operator-gt-gt-54">operator&gt;&gt;</a></b> ( QDataStream &amp; <i>in</i>, QByteArray &amp; <i>ba</i> )</li>
210
 
</ul>
 
173
<h2>Related Non-Members</h2>
 
174
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
175
<tr><td class="memItemLeft" align="right" valign="top">quint16 </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#qChecksum">qChecksum</a></b> ( const char * <i>data</i>, uint <i>len</i> )</td></tr>
 
176
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#qCompress">qCompress</a></b> ( const QByteArray &amp; <i>data</i>, int <i>compressionLevel</i> = -1 )</td></tr>
 
177
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#qCompress-2">qCompress</a></b> ( const uchar * <i>data</i>, int <i>nbytes</i>, int <i>compressionLevel</i> = -1 )</td></tr>
 
178
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#qUncompress">qUncompress</a></b> ( const QByteArray &amp; <i>data</i> )</td></tr>
 
179
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#qUncompress-2">qUncompress</a></b> ( const uchar * <i>data</i>, int <i>nbytes</i> )</td></tr>
 
180
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#qsnprintf">qsnprintf</a></b> ( char * <i>str</i>, size_t <i>n</i>, const char * <i>fmt</i>, ... )</td></tr>
 
181
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#qstrcmp">qstrcmp</a></b> ( const char * <i>str1</i>, const char * <i>str2</i> )</td></tr>
 
182
<tr><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#qstrcpy">qstrcpy</a></b> ( char * <i>dst</i>, const char * <i>src</i> )</td></tr>
 
183
<tr><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#qstrdup">qstrdup</a></b> ( const char * <i>src</i> )</td></tr>
 
184
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#qstricmp">qstricmp</a></b> ( const char * <i>str1</i>, const char * <i>str2</i> )</td></tr>
 
185
<tr><td class="memItemLeft" align="right" valign="top">uint </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#qstrlen">qstrlen</a></b> ( const char * <i>str</i> )</td></tr>
 
186
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#qstrncmp">qstrncmp</a></b> ( const char * <i>str1</i>, const char * <i>str2</i>, uint <i>len</i> )</td></tr>
 
187
<tr><td class="memItemLeft" align="right" valign="top">char * </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#qstrncpy">qstrncpy</a></b> ( char * <i>dst</i>, const char * <i>src</i>, uint <i>len</i> )</td></tr>
 
188
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#qstrnicmp">qstrnicmp</a></b> ( const char * <i>str1</i>, const char * <i>str2</i>, uint <i>len</i> )</td></tr>
 
189
<tr><td class="memItemLeft" align="right" valign="top">uint </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#qstrnlen">qstrnlen</a></b> ( const char * <i>str</i>, uint <i>maxlen</i> )</td></tr>
 
190
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#qvsnprintf">qvsnprintf</a></b> ( char * <i>str</i>, size_t <i>n</i>, const char * <i>fmt</i>, va_list <i>ap</i> )</td></tr>
 
191
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-not-eq-59">operator!=</a></b> ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</td></tr>
 
192
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-not-eq-60">operator!=</a></b> ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</td></tr>
 
193
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-not-eq-61">operator!=</a></b> ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</td></tr>
 
194
<tr><td class="memItemLeft" align="right" valign="top">const QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-2b-40">operator+</a></b> ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</td></tr>
 
195
<tr><td class="memItemLeft" align="right" valign="top">const QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-2b-41">operator+</a></b> ( const QByteArray &amp; <i>a1</i>, char <i>a2</i> )</td></tr>
 
196
<tr><td class="memItemLeft" align="right" valign="top">const QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-2b-42">operator+</a></b> ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</td></tr>
 
197
<tr><td class="memItemLeft" align="right" valign="top">const QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-2b-43">operator+</a></b> ( char <i>a1</i>, const QByteArray &amp; <i>a2</i> )</td></tr>
 
198
<tr><td class="memItemLeft" align="right" valign="top">const QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-2b-17">operator+</a></b> ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</td></tr>
 
199
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-lt-18">operator&lt;</a></b> ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</td></tr>
 
200
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-lt-19">operator&lt;</a></b> ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</td></tr>
 
201
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-lt-20">operator&lt;</a></b> ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</td></tr>
 
202
<tr><td class="memItemLeft" align="right" valign="top">QDataStream &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-lt-lt-141">operator&lt;&lt;</a></b> ( QDataStream &amp; <i>out</i>, const QByteArray &amp; <i>ba</i> )</td></tr>
 
203
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-lt-eq-13">operator&lt;=</a></b> ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</td></tr>
 
204
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-lt-eq-14">operator&lt;=</a></b> ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</td></tr>
 
205
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-lt-eq-15">operator&lt;=</a></b> ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</td></tr>
 
206
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-eq-eq-82">operator==</a></b> ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</td></tr>
 
207
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-eq-eq-83">operator==</a></b> ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</td></tr>
 
208
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-eq-eq-84">operator==</a></b> ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</td></tr>
 
209
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-gt-13">operator&gt;</a></b> ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</td></tr>
 
210
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-gt-14">operator&gt;</a></b> ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</td></tr>
 
211
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-gt-15">operator&gt;</a></b> ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</td></tr>
 
212
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-gt-eq-13">operator&gt;=</a></b> ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</td></tr>
 
213
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-gt-eq-14">operator&gt;=</a></b> ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</td></tr>
 
214
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-gt-eq-15">operator&gt;=</a></b> ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</td></tr>
 
215
<tr><td class="memItemLeft" align="right" valign="top">QDataStream &amp; </td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#operator-gt-gt-75">operator&gt;&gt;</a></b> ( QDataStream &amp; <i>in</i>, QByteArray &amp; <i>ba</i> )</td></tr>
 
216
</table>
 
217
<hr />
211
218
<a name="macros"></a>
212
 
<h3>Macros</h3>
213
 
<ul>
214
 
<li><div class="fn"></div><b><a href="qbytearray.html#QT_NO_CAST_FROM_BYTEARRAY">QT_NO_CAST_FROM_BYTEARRAY</a></b></li>
215
 
</ul>
 
219
<h2>Macros</h2>
 
220
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
221
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qbytearray.html#QT_NO_CAST_FROM_BYTEARRAY">QT_NO_CAST_FROM_BYTEARRAY</a></b></td></tr>
 
222
</table>
216
223
<a name="details"></a>
217
224
<hr />
218
225
<h2>Detailed Description</h2>
219
226
<p>The QByteArray class provides an array of bytes.</p>
220
 
<p>QByteArray can be used to store both raw bytes (including '\0's) and traditional 8-bit '\0'-terminated strings. Using QByteArray is much more convenient than using <tt>const char *</tt>. Behind the scenes, it always ensures that the data is followed by a '\0' terminator, and uses <a href="shared.html#implicit-sharing">implicit sharing</a> (copy-on-write) to reduce memory usage and avoid needless copying of data.</p>
 
227
<p>QByteArray can be used to store both raw bytes (including '\0's) and traditional 8-bit '\0'-terminated strings. Using QByteArray is much more convenient than using <tt>const char *</tt>. Behind the scenes, it always ensures that the data is followed by a '\0' terminator, and uses <a href="implicit-sharing.html">implicit sharing</a> (copy-on-write) to reduce memory usage and avoid needless copying of data.</p>
221
228
<p>In addition to QByteArray, Qt also provides the <a href="qstring.html">QString</a> class to store string data. For most purposes, <a href="qstring.html">QString</a> is the class you want to use. It stores 16-bit Unicode characters, making it easy to store non-ASCII/non-Latin-1 characters in your application. Furthermore, <a href="qstring.html">QString</a> is used throughout in the Qt API. The two main cases where QByteArray is appropriate are when you need to store raw binary data, and when memory conservation is critical (e.g&#x2e;, with Qt for Embedded Linux).</p>
222
229
<p>One way to initialize a QByteArray is simply to pass a <tt>const char *</tt> to its constructor. For example, the following code creates a byte array of size 5 containing the data &quot;Hello&quot;:</p>
223
230
<pre> QByteArray ba(&quot;Hello&quot;);</pre>
236
243
     if (ba.at(i) &gt;= 'a' &amp;&amp; ba.at(i) &lt;= 'f')
237
244
         cout &lt;&lt; &quot;Found character in range [a-f]&quot; &lt;&lt; endl;
238
245
 }</pre>
239
 
<p><a href="qbytearray.html#at">at</a>() can be faster than operator[](), because it never causes a <a href="shared.html#deep-copy">deep copy</a> to occur.</p>
 
246
<p><a href="qbytearray.html#at">at</a>() can be faster than operator[](), because it never causes a <a href="implicit-sharing.html#deep-copy">deep copy</a> to occur.</p>
240
247
<p>To extract many bytes at a time, use <a href="qbytearray.html#left">left</a>(), <a href="qbytearray.html#right">right</a>(), or <a href="qbytearray.html#mid">mid</a>().</p>
241
248
<p>A QByteArray can embed '\0' bytes. The <a href="qbytearray.html#size">size</a>() function always returns the size of the whole array, including embedded '\0' bytes. If you want to obtain the length of the data up to and excluding the first '\0' character, call <a href="qbytearray.html#qstrlen">qstrlen</a>() on the byte array.</p>
242
249
<p>After a call to <a href="qbytearray.html#resize">resize</a>(), newly allocated bytes have undefined values. To set all the bytes to a particular value, call <a href="qbytearray.html#fill">fill</a>().</p>
280
287
<p>See also <a href="qstring.html">QString</a> and <a href="qbitarray.html">QBitArray</a>.</p>
281
288
<hr />
282
289
<h2>Member Function Documentation</h2>
 
290
<a name="//apple_ref/cpp/instm/QByteArray/QByteArray" />
283
291
<h3 class="fn"><a name="QByteArray"></a>QByteArray::QByteArray ()</h3>
284
292
<p>Constructs an empty byte array.</p>
285
293
<p>See also <a href="qbytearray.html#isEmpty">isEmpty</a>().</p>
294
302
<h3 class="fn"><a name="QByteArray-4"></a>QByteArray::QByteArray ( int <i>size</i>, char <i>ch</i> )</h3>
295
303
<p>Constructs a byte array of size <i>size</i> with every byte set to character <i>ch</i>.</p>
296
304
<p>See also <a href="qbytearray.html#fill">fill</a>().</p>
297
 
<h3 class="fn"><a name="QByteArray-5"></a>QByteArray::QByteArray ( const QByteArray &amp; <i>other</i> )</h3>
 
305
<h3 class="fn"><a name="QByteArray-6"></a>QByteArray::QByteArray ( const QByteArray &amp; <i>other</i> )</h3>
298
306
<p>Constructs a copy of <i>other</i>.</p>
299
 
<p>This operation takes <a href="containers.html#constant-time">constant time</a>, because <a href="qbytearray.html">QByteArray</a> is <a href="shared.html#implicitly-shared">implicitly shared</a>. This makes returning a <a href="qbytearray.html">QByteArray</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>
 
307
<p>This operation takes <a href="containers.html#constant-time">constant time</a>, because <a href="qbytearray.html">QByteArray</a> is <a href="implicit-sharing.html#implicitly-shared">implicitly shared</a>. This makes returning a <a href="qbytearray.html">QByteArray</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>
300
308
<p>See also <a href="qbytearray.html#operator-eq">operator=</a>().</p>
 
309
<a name="//apple_ref/cpp/instm/QByteArray/~QByteArray" />
301
310
<h3 class="fn"><a name="dtor.QByteArray"></a>QByteArray::~QByteArray ()</h3>
302
311
<p>Destroys the byte array.</p>
 
312
<a name="//apple_ref/cpp/instm/QByteArray/append" />
303
313
<h3 class="fn"><a name="append"></a>QByteArray &amp; QByteArray::append ( const QByteArray &amp; <i>ba</i> )</h3>
304
314
<p>Appends the byte array <i>ba</i> onto the end of this byte array.</p>
305
315
<p>Example:</p>
309
319
<span class="comment"> // x == &quot;freedom&quot;</span></pre>
310
320
<p>This is the same as insert(<a href="qbytearray.html#size">size</a>(), <i>ba</i>).</p>
311
321
<p>This operation is typically very fast (<a href="containers.html#constant-time">constant time</a>), because <a href="qbytearray.html">QByteArray</a> preallocates extra space at the end of the character data so it can grow without reallocating the entire data each time.</p>
312
 
<p>Note: <a href="qbytearray.html">QByteArray</a> is an <a href="shared.html#implicitly-shared">implicitly shared</a> class. Consequently, if <i>this</i> is an empty <a href="qbytearray.html">QByteArray</a>, then <i>this</i> will just share the data held in <i>ba</i>. In this case, no copying of data is done.</p>
 
322
<p>Note: <a href="qbytearray.html">QByteArray</a> is an <a href="implicit-sharing.html#implicitly-shared">implicitly shared</a> class. Consequently, if <i>this</i> is an empty <a href="qbytearray.html">QByteArray</a>, then <i>this</i> will just share the data held in <i>ba</i>. In this case, no copying of data is done.</p>
313
323
<p>See also <a href="qbytearray.html#operator-2b-eq">operator+=</a>(), <a href="qbytearray.html#prepend">prepend</a>(), and <a href="qbytearray.html#insert">insert</a>().</p>
314
324
<h3 class="fn"><a name="append-2"></a>QByteArray &amp; QByteArray::append ( const <a href="qstring.html">QString</a> &amp; <i>str</i> )</h3>
315
325
<p>This is an overloaded function.</p>
325
335
<h3 class="fn"><a name="append-5"></a>QByteArray &amp; QByteArray::append ( char <i>ch</i> )</h3>
326
336
<p>This is an overloaded function.</p>
327
337
<p>Appends the character <i>ch</i> to this byte array.</p>
 
338
<a name="//apple_ref/cpp/instm/QByteArray/at" />
328
339
<h3 class="fn"><a name="at"></a>char QByteArray::at ( int <i>i</i> ) const</h3>
329
340
<p>Returns the character at index position <i>i</i> in the byte array.</p>
330
341
<p><i>i</i> must be a valid index position in the byte array (i.e&#x2e;, 0 &lt;= <i>i</i> &lt; <a href="qbytearray.html#size">size</a>()).</p>
331
342
<p>See also <a href="qbytearray.html#operator-5b-5d">operator[]</a>().</p>
 
343
<a name="//apple_ref/cpp/instm/QByteArray/capacity" />
332
344
<h3 class="fn"><a name="capacity"></a>int QByteArray::capacity () const</h3>
333
345
<p>Returns the maximum number of bytes that can be stored in the byte array without forcing a reallocation.</p>
334
346
<p>The sole purpose of this function is to provide a means of fine tuning <a href="qbytearray.html">QByteArray</a>'s memory usage. In general, you will rarely ever need to call this function. If you want to know how many bytes are in the byte array, call <a href="qbytearray.html#size">size</a>().</p>
335
347
<p>See also <a href="qbytearray.html#reserve">reserve</a>() and <a href="qbytearray.html#squeeze">squeeze</a>().</p>
 
348
<a name="//apple_ref/cpp/instm/QByteArray/chop" />
336
349
<h3 class="fn"><a name="chop"></a>void QByteArray::chop ( int <i>n</i> )</h3>
337
350
<p>Removes <i>n</i> bytes from the end of the byte array.</p>
338
351
<p>If <i>n</i> is greater than <a href="qbytearray.html#size">size</a>(), the result is an empty byte array.</p>
340
353
<pre> QByteArray ba(&quot;STARTTLS\r\n&quot;);
341
354
 ba.chop(2);                 <span class="comment">// ba == &quot;STARTTLS&quot;</span></pre>
342
355
<p>See also <a href="qbytearray.html#truncate">truncate</a>(), <a href="qbytearray.html#resize">resize</a>(), and <a href="qbytearray.html#left">left</a>().</p>
 
356
<a name="//apple_ref/cpp/instm/QByteArray/clear" />
343
357
<h3 class="fn"><a name="clear"></a>void QByteArray::clear ()</h3>
344
358
<p>Clears the contents of the byte array and makes it empty.</p>
345
359
<p>See also <a href="qbytearray.html#resize">resize</a>() and <a href="qbytearray.html#isEmpty">isEmpty</a>().</p>
 
360
<a name="//apple_ref/cpp/instm/QByteArray/constData" />
346
361
<h3 class="fn"><a name="constData"></a>const char * QByteArray::constData () const</h3>
347
362
<p>Returns a pointer to the data stored in the byte array. The pointer can be used to access the bytes that compose the array. The data is '\0'-terminated. The pointer remains valid as long as the byte array isn't reallocated or destroyed.</p>
348
363
<p>This function is mostly useful to pass a byte array to a function that accepts a <tt>const char *</tt>.</p>
349
364
<p>Note: A <a href="qbytearray.html">QByteArray</a> can store any byte values including '\0's, but most functions that take <tt>char *</tt> arguments assume that the data ends at the first '\0' they encounter.</p>
350
365
<p>See also <a href="qbytearray.html#data">data</a>() and <a href="qbytearray.html#operator-5b-5d">operator[]</a>().</p>
 
366
<a name="//apple_ref/cpp/instm/QByteArray/contains" />
351
367
<h3 class="fn"><a name="contains"></a>bool QByteArray::contains ( const QByteArray &amp; <i>ba</i> ) const</h3>
352
368
<p>Returns true if the byte array contains an occurrence of the byte array <i>ba</i>; otherwise returns false.</p>
353
369
<p>See also <a href="qbytearray.html#indexOf">indexOf</a>() and <a href="qbytearray.html#count">count</a>().</p>
357
373
<h3 class="fn"><a name="contains-3"></a>bool QByteArray::contains ( char <i>ch</i> ) const</h3>
358
374
<p>This is an overloaded function.</p>
359
375
<p>Returns true if the byte array contains the character <i>ch</i>; otherwise returns false.</p>
 
376
<a name="//apple_ref/cpp/instm/QByteArray/count" />
360
377
<h3 class="fn"><a name="count"></a>int QByteArray::count ( const QByteArray &amp; <i>ba</i> ) const</h3>
361
378
<p>Returns the number of (potentially overlapping) occurrences of byte array <i>ba</i> in this byte array.</p>
362
379
<p>See also <a href="qbytearray.html#contains">contains</a>() and <a href="qbytearray.html#indexOf">indexOf</a>().</p>
370
387
<h3 class="fn"><a name="count-4"></a>int QByteArray::count () const</h3>
371
388
<p>This is an overloaded function.</p>
372
389
<p>Same as <a href="qbytearray.html#size">size</a>().</p>
 
390
<a name="//apple_ref/cpp/instm/QByteArray/data" />
373
391
<h3 class="fn"><a name="data"></a>char * QByteArray::data ()</h3>
374
392
<p>Returns a pointer to the data stored in the byte array. The pointer can be used to access and modify the bytes that compose the array. The data is '\0'-terminated.</p>
375
393
<p>Example:</p>
379
397
     cout &lt;&lt; &quot;[&quot; &lt;&lt; *data &lt;&lt; &quot;]&quot; &lt;&lt; endl;
380
398
     ++data;
381
399
 }</pre>
382
 
<p>The pointer remains valid as long as the byte array isn't reallocated or destroyed. For read-only access, <a href="qbytearray.html#constData">constData</a>() is faster because it never causes a <a href="shared.html#deep-copy">deep copy</a> to occur.</p>
 
400
<p>The pointer remains valid as long as the byte array isn't reallocated or destroyed. For read-only access, <a href="qbytearray.html#constData">constData</a>() is faster because it never causes a <a href="implicit-sharing.html#deep-copy">deep copy</a> to occur.</p>
383
401
<p>This function is mostly useful to pass a byte array to a function that accepts a <tt>const char *</tt>.</p>
384
402
<p>Note: A <a href="qbytearray.html">QByteArray</a> can store any byte values including '\0's, but most functions that take <tt>char *</tt> arguments assume that the data ends at the first '\0' they encounter.</p>
385
403
<p>See also <a href="qbytearray.html#constData">constData</a>() and <a href="qbytearray.html#operator-5b-5d">operator[]</a>().</p>
386
404
<h3 class="fn"><a name="data-2"></a>const char * QByteArray::data () const</h3>
387
405
<p>This is an overloaded function.</p>
 
406
<a name="//apple_ref/cpp/instm/QByteArray/endsWith" />
388
407
<h3 class="fn"><a name="endsWith"></a>bool QByteArray::endsWith ( const QByteArray &amp; <i>ba</i> ) const</h3>
389
408
<p>Returns true if this byte array ends with byte array <i>ba</i>; otherwise returns false.</p>
390
409
<p>Example:</p>
391
 
<pre> QByteArray url(&quot;http:<span class="comment">//qtsoftware.com/index.html&quot;);</span>
 
410
<pre> QByteArray url(&quot;http:<span class="comment">//qt.nokia.com/index.html&quot;);</span>
392
411
 if (url.endsWith(&quot;.html&quot;))
393
412
     ...</pre>
394
413
<p>See also <a href="qbytearray.html#startsWith">startsWith</a>() and <a href="qbytearray.html#right">right</a>().</p>
398
417
<h3 class="fn"><a name="endsWith-3"></a>bool QByteArray::endsWith ( char <i>ch</i> ) const</h3>
399
418
<p>This is an overloaded function.</p>
400
419
<p>Returns true if this byte array ends with character <i>ch</i>; otherwise returns false.</p>
 
420
<a name="//apple_ref/cpp/instm/QByteArray/fill" />
401
421
<h3 class="fn"><a name="fill"></a>QByteArray &amp; QByteArray::fill ( char <i>ch</i>, int <i>size</i> = -1 )</h3>
402
422
<p>Sets every byte in the byte array to character <i>ch</i>. If <i>size</i> is different from -1 (the default), the byte array is resized to size <i>size</i> beforehand.</p>
403
423
<p>Example:</p>
408
428
 ba.fill('X', 2);
409
429
<span class="comment"> // ba == &quot;XX&quot;</span></pre>
410
430
<p>See also <a href="qbytearray.html#resize">resize</a>().</p>
 
431
<a name="//apple_ref/cpp/clm/QByteArray/fromBase64" />
411
432
<h3 class="fn"><a name="fromBase64"></a>QByteArray QByteArray::fromBase64 ( const QByteArray &amp; <i>base64</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
412
433
<p>Returns a decoded copy of the Base64 array <i>base64</i>. Input is not checked for validity; invalid characters in the input are skipped, enabling the decoding process to continue with subsequent characters.</p>
413
434
<p>For example:</p>
415
436
 text.data();            <span class="comment">// returns &quot;Qt is great</span>!&quot;</pre>
416
437
<p>The algorithm used to decode Base64-encoded data is defined in <a href="http://www.rfc-editor.org/rfc/rfc2045.txt">RFC 2045</a>.</p>
417
438
<p>See also <a href="qbytearray.html#toBase64">toBase64</a>().</p>
 
439
<a name="//apple_ref/cpp/clm/QByteArray/fromHex" />
418
440
<h3 class="fn"><a name="fromHex"></a>QByteArray QByteArray::fromHex ( const QByteArray &amp; <i>hexEncoded</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
419
441
<p>Returns a decoded copy of the hex encoded array <i>hexEncoded</i>. Input is not checked for validity; invalid characters in the input are skipped, enabling the decoding process to continue with subsequent characters.</p>
420
442
<p>For example:</p>
421
443
<pre> QByteArray text = QByteArray::fromHex(&quot;517420697320677265617421&quot;);
422
444
 text.data();            <span class="comment">// returns &quot;Qt is great</span>!&quot;</pre>
423
445
<p>See also <a href="qbytearray.html#toHex">toHex</a>().</p>
 
446
<a name="//apple_ref/cpp/clm/QByteArray/fromPercentEncoding" />
424
447
<h3 class="fn"><a name="fromPercentEncoding"></a>QByteArray QByteArray::fromPercentEncoding ( const QByteArray &amp; <i>input</i>, char <i>percent</i> = '%' )&nbsp;&nbsp;<tt> [static]</tt></h3>
425
 
<p>Returns a decoded copy of the URI/URL-style percent-encoded <i>input</i>. The <i>percent</i> parameter allows you to replace the '%' character for another (for instance, '_' or '=').</p>
 
448
<p>Returns a decoded copy of the URI/URL-style percent-encoded <i>input</i>. The <i>percent</i> parameter allows you to replace the '%' character for another (for instance, '<a href="examples-overview.html">_</a>' or '=').</p>
426
449
<p>For example:</p>
427
450
<pre> QByteArray text = QByteArray::fromPercentEncoding(&quot;Qt%20is%20great%33&quot;);
428
451
 text.data();            <span class="comment">// returns &quot;Qt is great</span>!&quot;</pre>
429
452
<p>This function was introduced in Qt 4.4.</p>
430
453
<p>See also <a href="qbytearray.html#toPercentEncoding">toPercentEncoding</a>() and <a href="qurl.html#fromPercentEncoding">QUrl::fromPercentEncoding</a>().</p>
 
454
<a name="//apple_ref/cpp/clm/QByteArray/fromRawData" />
431
455
<h3 class="fn"><a name="fromRawData"></a>QByteArray QByteArray::fromRawData ( const char * <i>data</i>, int <i>size</i> )&nbsp;&nbsp;<tt> [static]</tt></h3>
432
 
<p>Constructs a <a href="qbytearray.html">QByteArray</a> that uses the first <i>size</i> bytes of the <i>data</i> array. The bytes are <i>not</i> copied. The <a href="qbytearray.html">QByteArray</a> will contain the <i>data</i> pointer. The caller guarantees that <i>data</i> will not be deleted or modified as long as this <a href="qbytearray.html">QByteArray</a> and any copies of it exist that have not been modified. In other words, because <a href="qbytearray.html">QByteArray</a> is an <a href="shared.html#implicitly-shared">implicitly shared</a> class and the instance returned by this function contains the <i>data</i> pointer, the caller must not delete <i>data</i> or modify it directly as long as the returned <a href="qbytearray.html">QByteArray</a> and any copies exist. However, <a href="qbytearray.html">QByteArray</a> does not take ownership of <i>data</i>, so the <a href="qbytearray.html">QByteArray</a> destructor will never delete the raw <i>data</i>, even when the last <a href="qbytearray.html">QByteArray</a> referring to <i>data</i> is destroyed.</p>
 
456
<p>Constructs a <a href="qbytearray.html">QByteArray</a> that uses the first <i>size</i> bytes of the <i>data</i> array. The bytes are <i>not</i> copied. The <a href="qbytearray.html">QByteArray</a> will contain the <i>data</i> pointer. The caller guarantees that <i>data</i> will not be deleted or modified as long as this <a href="qbytearray.html">QByteArray</a> and any copies of it exist that have not been modified. In other words, because <a href="qbytearray.html">QByteArray</a> is an <a href="implicit-sharing.html#implicitly-shared">implicitly shared</a> class and the instance returned by this function contains the <i>data</i> pointer, the caller must not delete <i>data</i> or modify it directly as long as the returned <a href="qbytearray.html">QByteArray</a> and any copies exist. However, <a href="qbytearray.html">QByteArray</a> does not take ownership of <i>data</i>, so the <a href="qbytearray.html">QByteArray</a> destructor will never delete the raw <i>data</i>, even when the last <a href="qbytearray.html">QByteArray</a> referring to <i>data</i> is destroyed.</p>
433
457
<p>A subsequent attempt to modify the contents of the returned <a href="qbytearray.html">QByteArray</a> or any copy made from it will cause it to create a deep copy of the <i>data</i> array before doing the modification. This ensures that the raw <i>data</i> array itself will never be modified by <a href="qbytearray.html">QByteArray</a>.</p>
434
458
<p>Here is an example of how to read data using a <a href="qdatastream.html">QDataStream</a> on raw data in memory without copying the raw data into a <a href="qbytearray.html">QByteArray</a>:</p>
435
459
<pre>  static const char mydata[] = {
444
468
 ...</pre>
445
469
<p><b>Warning:</b> A byte array created with fromRawData() is <i>not</i> null-terminated, unless the raw data contains a 0 character at position <i>size</i>. While that does not matter for <a href="qdatastream.html">QDataStream</a> or functions like <a href="qbytearray.html#indexOf">indexOf</a>(), passing the byte array to a function accepting a <tt>const char *</tt> expected to be '\0'-terminated will fail.</p>
446
470
<p>See also <a href="qbytearray.html#data">data</a>() and <a href="qbytearray.html#constData">constData</a>().</p>
 
471
<a name="//apple_ref/cpp/instm/QByteArray/indexOf" />
447
472
<h3 class="fn"><a name="indexOf"></a>int QByteArray::indexOf ( const QByteArray &amp; <i>ba</i>, int <i>from</i> = 0 ) const</h3>
448
473
<p>Returns the index position of the first occurrence of the byte array <i>ba</i> in this byte array, searching forward from index position <i>from</i>. Returns -1 if <i>ba</i> could not be found.</p>
449
474
<p>Example:</p>
472
497
 ba.indexOf(&quot;B&quot;, 2);         <span class="comment">// returns 3</span>
473
498
 ba.indexOf(&quot;X&quot;);            <span class="comment">// returns -1</span></pre>
474
499
<p>See also <a href="qbytearray.html#lastIndexOf">lastIndexOf</a>() and <a href="qbytearray.html#contains">contains</a>().</p>
 
500
<a name="//apple_ref/cpp/instm/QByteArray/insert" />
475
501
<h3 class="fn"><a name="insert"></a>QByteArray &amp; QByteArray::insert ( int <i>i</i>, const QByteArray &amp; <i>ba</i> )</h3>
476
502
<p>Inserts the byte array <i>ba</i> at index position <i>i</i> and returns a reference to this byte array.</p>
477
503
<p>Example:</p>
488
514
<p>This is an overloaded function.</p>
489
515
<p>Inserts the string <i>str</i> at position <i>i</i> in the byte array.</p>
490
516
<p>If <i>i</i> is greater than <a href="qbytearray.html#size">size</a>(), the array is first extended using <a href="qbytearray.html#resize">resize</a>().</p>
491
 
<h3 class="fn"><a name="insert-4"></a>QByteArray &amp; QByteArray::insert ( int <i>i</i>, char <i>ch</i> )</h3>
 
517
<h3 class="fn"><a name="insert-4"></a>QByteArray &amp; QByteArray::insert ( int <i>i</i>, const char * <i>str</i>, int <i>len</i> )</h3>
 
518
<p>This is an overloaded function.</p>
 
519
<p>Inserts <i>len</i> bytes of the string <i>str</i> at position <i>i</i> in the byte array.</p>
 
520
<p>If <i>i</i> is greater than <a href="qbytearray.html#size">size</a>(), the array is first extended using <a href="qbytearray.html#resize">resize</a>().</p>
 
521
<p>This function was introduced in Qt 4.6.</p>
 
522
<h3 class="fn"><a name="insert-5"></a>QByteArray &amp; QByteArray::insert ( int <i>i</i>, char <i>ch</i> )</h3>
492
523
<p>This is an overloaded function.</p>
493
524
<p>Inserts character <i>ch</i> at index position <i>i</i> in the byte array. If <i>i</i> is greater than <a href="qbytearray.html#size">size</a>(), the array is first extended using <a href="qbytearray.html#resize">resize</a>().</p>
 
525
<a name="//apple_ref/cpp/instm/QByteArray/isEmpty" />
494
526
<h3 class="fn"><a name="isEmpty"></a>bool QByteArray::isEmpty () const</h3>
495
527
<p>Returns true if the byte array has size 0; otherwise returns false.</p>
496
528
<p>Example:</p>
498
530
 QByteArray(&quot;&quot;).isEmpty();       <span class="comment">// returns true</span>
499
531
 QByteArray(&quot;abc&quot;).isEmpty();    <span class="comment">// returns false</span></pre>
500
532
<p>See also <a href="qbytearray.html#size">size</a>().</p>
 
533
<a name="//apple_ref/cpp/instm/QByteArray/isNull" />
501
534
<h3 class="fn"><a name="isNull"></a>bool QByteArray::isNull () const</h3>
502
535
<p>Returns true if this byte array is null; otherwise returns false.</p>
503
536
<p>Example:</p>
506
539
 QByteArray(&quot;abc&quot;).isNull();     <span class="comment">// returns false</span></pre>
507
540
<p>Qt makes a distinction between null byte arrays and empty byte arrays for historical reasons. For most applications, what matters is whether or not a byte array contains any data, and this can be determined using <a href="qbytearray.html#isEmpty">isEmpty</a>().</p>
508
541
<p>See also <a href="qbytearray.html#isEmpty">isEmpty</a>().</p>
 
542
<a name="//apple_ref/cpp/instm/QByteArray/lastIndexOf" />
509
543
<h3 class="fn"><a name="lastIndexOf"></a>int QByteArray::lastIndexOf ( const QByteArray &amp; <i>ba</i>, int <i>from</i> = -1 ) const</h3>
510
544
<p>Returns the index position of the last occurrence of the byte array <i>ba</i> in this byte array, searching backward from index position <i>from</i>. If <i>from</i> is -1 (the default), the search starts at the last byte. Returns -1 if <i>ba</i> could not be found.</p>
511
545
<p>Example:</p>
534
568
 ba.lastIndexOf(&quot;B&quot;, 2);     <span class="comment">// returns 1</span>
535
569
 ba.lastIndexOf(&quot;X&quot;);        <span class="comment">// returns -1</span></pre>
536
570
<p>See also <a href="qbytearray.html#indexOf">indexOf</a>() and <a href="qbytearray.html#contains">contains</a>().</p>
 
571
<a name="//apple_ref/cpp/instm/QByteArray/left" />
537
572
<h3 class="fn"><a name="left"></a>QByteArray QByteArray::left ( int <i>len</i> ) const</h3>
538
573
<p>Returns a byte array that contains the leftmost <i>len</i> bytes of this byte array.</p>
539
574
<p>The entire byte array is returned if <i>len</i> is greater than <a href="qbytearray.html#size">size</a>().</p>
542
577
 QByteArray y = x.left(4);
543
578
<span class="comment"> // y == &quot;Pine&quot;</span></pre>
544
579
<p>See also <a href="qbytearray.html#right">right</a>(), <a href="qbytearray.html#mid">mid</a>(), <a href="qbytearray.html#startsWith">startsWith</a>(), and <a href="qbytearray.html#truncate">truncate</a>().</p>
 
580
<a name="//apple_ref/cpp/instm/QByteArray/leftJustified" />
545
581
<h3 class="fn"><a name="leftJustified"></a>QByteArray QByteArray::leftJustified ( int <i>width</i>, char <i>fill</i> = ' ', bool <i>truncate</i> = false ) const</h3>
546
582
<p>Returns a byte array of size <i>width</i> that contains this byte array padded by the <i>fill</i> character.</p>
547
583
<p>If <i>truncate</i> is false and the <a href="qbytearray.html#size">size</a>() of the byte array is more than <i>width</i>, then the returned byte array is a copy of this byte array.</p>
550
586
<pre> QByteArray x(&quot;apple&quot;);
551
587
 QByteArray y = x.leftJustified(8, '.');   <span class="comment">// y == &quot;apple...&quot;</span></pre>
552
588
<p>See also <a href="qbytearray.html#rightJustified">rightJustified</a>().</p>
 
589
<a name="//apple_ref/cpp/instm/QByteArray/length" />
553
590
<h3 class="fn"><a name="length"></a>int QByteArray::length () const</h3>
554
591
<p>Same as <a href="qbytearray.html#size">size</a>().</p>
 
592
<a name="//apple_ref/cpp/instm/QByteArray/mid" />
555
593
<h3 class="fn"><a name="mid"></a>QByteArray QByteArray::mid ( int <i>pos</i>, int <i>len</i> = -1 ) const</h3>
556
594
<p>Returns a byte array containing <i>len</i> bytes from this byte array, starting at position <i>pos</i>.</p>
557
595
<p>If <i>len</i> is -1 (the default), or <i>pos</i> + <i>len</i> &gt;= <a href="qbytearray.html#size">size</a>(), returns a byte array containing all bytes starting at position <i>pos</i> until the end of the byte array.</p>
560
598
 QByteArray y = x.mid(5, 4);     <span class="comment">// y == &quot;pine&quot;</span>
561
599
 QByteArray z = x.mid(5);        <span class="comment">// z == &quot;pineapples&quot;</span></pre>
562
600
<p>See also <a href="qbytearray.html#left">left</a>() and <a href="qbytearray.html#right">right</a>().</p>
 
601
<a name="//apple_ref/cpp/clm/QByteArray/number" />
563
602
<h3 class="fn"><a name="number"></a>QByteArray QByteArray::number ( int <i>n</i>, int <i>base</i> = 10 )&nbsp;&nbsp;<tt> [static]</tt></h3>
564
603
<p>Returns a byte array containing the string equivalent of the number <i>n</i> to base <i>base</i> (10 by default). The <i>base</i> can be any value between 2 and 36.</p>
565
604
<p>Example:</p>
582
621
<p>This is an overloaded function.</p>
583
622
<p>Returns a byte array that contains the printed value of <i>n</i>, formatted in format <i>f</i> with precision <i>prec</i>.</p>
584
623
<p>Argument <i>n</i> is formatted according to the <i>f</i> format specified, which is <tt>g</tt> by default, and can be any of the following:</p>
585
 
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
 
624
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
586
625
<thead><tr valign="top" class="qt-style"><th>Format</th><th>Meaning</th></tr></thead>
587
626
<tr valign="top" class="odd"><td><tt>e</tt></td><td>format as [-]9.9e[+|-]999</td></tr>
588
627
<tr valign="top" class="even"><td><tt>E</tt></td><td>format as [-]9.9E[+|-]999</td></tr>
595
634
<span class="comment"> // ba == 1.235E+01</span></pre>
596
635
<p><b>Note:</b> The format of the number is not localized; the default C locale is used irrespective of the user's locale.</p>
597
636
<p>See also <a href="qbytearray.html#toDouble">toDouble</a>().</p>
 
637
<a name="//apple_ref/cpp/instm/QByteArray/prepend" />
598
638
<h3 class="fn"><a name="prepend"></a>QByteArray &amp; QByteArray::prepend ( const QByteArray &amp; <i>ba</i> )</h3>
599
639
<p>Prepends the byte array <i>ba</i> to this byte array and returns a reference to this byte array.</p>
600
640
<p>Example:</p>
603
643
 x.prepend(y);
604
644
<span class="comment"> // x == &quot;airship&quot;</span></pre>
605
645
<p>This is the same as insert(0, <i>ba</i>).</p>
606
 
<p>Note: <a href="qbytearray.html">QByteArray</a> is an <a href="shared.html#implicitly-shared">implicitly shared</a> class. Consequently, if <i>this</i> is an empty <a href="qbytearray.html">QByteArray</a>, then <i>this</i> will just share the data held in <i>ba</i>. In this case, no copying of data is done.</p>
 
646
<p>Note: <a href="qbytearray.html">QByteArray</a> is an <a href="implicit-sharing.html#implicitly-shared">implicitly shared</a> class. Consequently, if <i>this</i> is an empty <a href="qbytearray.html">QByteArray</a>, then <i>this</i> will just share the data held in <i>ba</i>. In this case, no copying of data is done.</p>
607
647
<p>See also <a href="qbytearray.html#append">append</a>() and <a href="qbytearray.html#insert">insert</a>().</p>
608
648
<h3 class="fn"><a name="prepend-2"></a>QByteArray &amp; QByteArray::prepend ( const char * <i>str</i> )</h3>
609
649
<p>This is an overloaded function.</p>
610
650
<p>Prepends the string <i>str</i> to this byte array.</p>
611
 
<h3 class="fn"><a name="prepend-3"></a>QByteArray &amp; QByteArray::prepend ( char <i>ch</i> )</h3>
 
651
<h3 class="fn"><a name="prepend-3"></a>QByteArray &amp; QByteArray::prepend ( const char * <i>str</i>, int <i>len</i> )</h3>
 
652
<p>This is an overloaded function.</p>
 
653
<p>Prepends <i>len</i> bytes of the string <i>str</i> to this byte array.</p>
 
654
<p>This function was introduced in Qt 4.6.</p>
 
655
<h3 class="fn"><a name="prepend-4"></a>QByteArray &amp; QByteArray::prepend ( char <i>ch</i> )</h3>
612
656
<p>This is an overloaded function.</p>
613
657
<p>Prepends the character <i>ch</i> to this byte array.</p>
 
658
<a name="//apple_ref/cpp/instm/QByteArray/push_back" />
614
659
<h3 class="fn"><a name="push_back"></a>void QByteArray::push_back ( const QByteArray &amp; <i>other</i> )</h3>
615
660
<p>This function is provided for STL compatibility. It is equivalent to append(<i>other</i>).</p>
616
661
<h3 class="fn"><a name="push_back-2"></a>void QByteArray::push_back ( const char * <i>str</i> )</h3>
619
664
<h3 class="fn"><a name="push_back-3"></a>void QByteArray::push_back ( char <i>ch</i> )</h3>
620
665
<p>This is an overloaded function.</p>
621
666
<p>Same as append(<i>ch</i>).</p>
 
667
<a name="//apple_ref/cpp/instm/QByteArray/push_front" />
622
668
<h3 class="fn"><a name="push_front"></a>void QByteArray::push_front ( const QByteArray &amp; <i>other</i> )</h3>
623
669
<p>This function is provided for STL compatibility. It is equivalent to prepend(<i>other</i>).</p>
624
670
<h3 class="fn"><a name="push_front-2"></a>void QByteArray::push_front ( const char * <i>str</i> )</h3>
627
673
<h3 class="fn"><a name="push_front-3"></a>void QByteArray::push_front ( char <i>ch</i> )</h3>
628
674
<p>This is an overloaded function.</p>
629
675
<p>Same as prepend(<i>ch</i>).</p>
 
676
<a name="//apple_ref/cpp/instm/QByteArray/remove" />
630
677
<h3 class="fn"><a name="remove"></a>QByteArray &amp; QByteArray::remove ( int <i>pos</i>, int <i>len</i> )</h3>
631
678
<p>Removes <i>len</i> bytes from the array, starting at index position <i>pos</i>, and returns a reference to the array.</p>
632
679
<p>If <i>pos</i> is out of range, nothing happens. If <i>pos</i> is valid, but <i>pos</i> + <i>len</i> is larger than the size of the array, the array is truncated at position <i>pos</i>.</p>
635
682
 ba.remove(1, 4);
636
683
<span class="comment"> // ba == &quot;Meal&quot;</span></pre>
637
684
<p>See also <a href="qbytearray.html#insert">insert</a>() and <a href="qbytearray.html#replace">replace</a>().</p>
 
685
<a name="//apple_ref/cpp/instm/QByteArray/repeated" />
638
686
<h3 class="fn"><a name="repeated"></a>QByteArray QByteArray::repeated ( int <i>times</i> ) const</h3>
639
687
<p>Returns a copy of this byte array repeated the specified number of <i>times</i>.</p>
640
688
<p>If <i>times</i> is less than 1, an empty byte array is returned.</p>
642
690
<pre> QByteArray ba(&quot;ab&quot;);
643
691
 ba.repeated(4);             <span class="comment">// returns &quot;abababab&quot;</span></pre>
644
692
<p>This function was introduced in Qt 4.5.</p>
 
693
<a name="//apple_ref/cpp/instm/QByteArray/replace" />
645
694
<h3 class="fn"><a name="replace"></a>QByteArray &amp; QByteArray::replace ( int <i>pos</i>, int <i>len</i>, const QByteArray &amp; <i>after</i> )</h3>
646
695
<p>Replaces <i>len</i> bytes from index position <i>pos</i> with the byte array <i>after</i>, and returns a reference to this byte array.</p>
647
696
<p>Example:</p>
691
740
<h3 class="fn"><a name="replace-13"></a>QByteArray &amp; QByteArray::replace ( char <i>before</i>, char <i>after</i> )</h3>
692
741
<p>This is an overloaded function.</p>
693
742
<p>Replaces every occurrence of the character <i>before</i> with the character <i>after</i>.</p>
 
743
<a name="//apple_ref/cpp/instm/QByteArray/reserve" />
694
744
<h3 class="fn"><a name="reserve"></a>void QByteArray::reserve ( int <i>size</i> )</h3>
695
745
<p>Attempts to allocate memory for at least <i>size</i> bytes. If you know in advance how large the byte array will be, you can call this function, and if you call <a href="qbytearray.html#resize">resize</a>() often you are likely to get better performance. If <i>size</i> is an underestimate, the worst that will happen is that the <a href="qbytearray.html">QByteArray</a> will be a bit slower.</p>
696
746
<p>The sole purpose of this function is to provide a means of fine tuning <a href="qbytearray.html">QByteArray</a>'s memory usage. In general, you will rarely ever need to call this function. If you want to change the size of the byte array, call <a href="qbytearray.html#resize">resize</a>().</p>
697
747
<p>See also <a href="qbytearray.html#squeeze">squeeze</a>() and <a href="qbytearray.html#capacity">capacity</a>().</p>
 
748
<a name="//apple_ref/cpp/instm/QByteArray/resize" />
698
749
<h3 class="fn"><a name="resize"></a>void QByteArray::resize ( int <i>size</i> )</h3>
699
750
<p>Sets the size of the byte array to <i>size</i> bytes.</p>
700
751
<p>If <i>size</i> is greater than the current size, the byte array is extended to make it <i>size</i> bytes with the extra bytes added to the end. The new bytes are uninitialized.</p>
701
752
<p>If <i>size</i> is less than the current size, bytes are removed from the end.</p>
702
753
<p>See also <a href="qbytearray.html#size">size</a>().</p>
 
754
<a name="//apple_ref/cpp/instm/QByteArray/right" />
703
755
<h3 class="fn"><a name="right"></a>QByteArray QByteArray::right ( int <i>len</i> ) const</h3>
704
756
<p>Returns a byte array that contains the rightmost <i>len</i> bytes of this byte array.</p>
705
757
<p>The entire byte array is returned if <i>len</i> is greater than <a href="qbytearray.html#size">size</a>().</p>
708
760
 QByteArray y = x.right(5);
709
761
<span class="comment"> // y == &quot;apple&quot;</span></pre>
710
762
<p>See also <a href="qbytearray.html#endsWith">endsWith</a>(), <a href="qbytearray.html#left">left</a>(), and <a href="qbytearray.html#mid">mid</a>().</p>
 
763
<a name="//apple_ref/cpp/instm/QByteArray/rightJustified" />
711
764
<h3 class="fn"><a name="rightJustified"></a>QByteArray QByteArray::rightJustified ( int <i>width</i>, char <i>fill</i> = ' ', bool <i>truncate</i> = false ) const</h3>
712
765
<p>Returns a byte array of size <i>width</i> that contains the <i>fill</i> character followed by this byte array.</p>
713
766
<p>If <i>truncate</i> is false and the size of the byte array is more than <i>width</i>, then the returned byte array is a copy of this byte array.</p>
716
769
<pre> QByteArray x(&quot;apple&quot;);
717
770
 QByteArray y = x.rightJustified(8, '.');    <span class="comment">// y == &quot;...apple&quot;</span></pre>
718
771
<p>See also <a href="qbytearray.html#leftJustified">leftJustified</a>().</p>
 
772
<a name="//apple_ref/cpp/instm/QByteArray/setNum" />
719
773
<h3 class="fn"><a name="setNum"></a>QByteArray &amp; QByteArray::setNum ( int <i>n</i>, int <i>base</i> = 10 )</h3>
720
774
<p>Sets the byte array to the printed value of <i>n</i> in base <i>base</i> (10 by default) and returns a reference to the byte array. The <i>base</i> can be any value between 2 and 36.</p>
721
775
<p>Example:</p>
744
798
<p>This is an overloaded function.</p>
745
799
<p>Sets the byte array to the printed value of <i>n</i>, formatted in format <i>f</i> with precision <i>prec</i>, and returns a reference to the byte array.</p>
746
800
<p>The format <i>f</i> can be any of the following:</p>
747
 
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
 
801
<p><table class="generic" align="center" cellpadding="2" cellspacing="1" border="0">
748
802
<thead><tr valign="top" class="qt-style"><th>Format</th><th>Meaning</th></tr></thead>
749
803
<tr valign="top" class="odd"><td><tt>e</tt></td><td>format as [-]9.9e[+|-]999</td></tr>
750
804
<tr valign="top" class="even"><td><tt>E</tt></td><td>format as [-]9.9E[+|-]999</td></tr>
760
814
<p>Sets the byte array to the printed value of <i>n</i>, formatted in format <i>f</i> with precision <i>prec</i>, and returns a reference to the byte array.</p>
761
815
<p><b>Note:</b> The format of the number is not localized; the default C locale is used irrespective of the user's locale.</p>
762
816
<p>See also <a href="qbytearray.html#toFloat">toFloat</a>().</p>
 
817
<a name="//apple_ref/cpp/instm/QByteArray/simplified" />
763
818
<h3 class="fn"><a name="simplified"></a>QByteArray QByteArray::simplified () const</h3>
764
819
<p>Returns a byte array that has whitespace removed from the start and the end, and which has each sequence of internal whitespace replaced with a single space.</p>
765
820
<p>Whitespace means any character for which the standard C++ isspace() function returns true. This includes the ASCII characters '\t', '\n', '\v', '\f', '\r', and ' '.</p>
768
823
 ba = ba.simplified();
769
824
<span class="comment"> // ba == &quot;lots of whitespace&quot;;</span></pre>
770
825
<p>See also <a href="qbytearray.html#trimmed">trimmed</a>().</p>
 
826
<a name="//apple_ref/cpp/instm/QByteArray/size" />
771
827
<h3 class="fn"><a name="size"></a>int QByteArray::size () const</h3>
772
828
<p>Returns the number of bytes in this byte array.</p>
773
829
<p>The last byte in the byte array is at position size() - 1. In addition, <a href="qbytearray.html">QByteArray</a> ensures that the byte at position size() is always '\0', so that you can use the return value of <a href="qbytearray.html#data">data</a>() and <a href="qbytearray.html#constData">constData</a>() as arguments to functions that expect '\0'-terminated strings.</p>
778
834
 ba.data()[4];               <span class="comment">// returns 'o'</span>
779
835
 ba.data()[5];               <span class="comment">// returns '\0'</span></pre>
780
836
<p>See also <a href="qbytearray.html#isEmpty">isEmpty</a>() and <a href="qbytearray.html#resize">resize</a>().</p>
 
837
<a name="//apple_ref/cpp/instm/QByteArray/split" />
781
838
<h3 class="fn"><a name="split"></a><a href="qlist.html">QList</a>&lt;QByteArray&gt; QByteArray::split ( char <i>sep</i> ) const</h3>
782
839
<p>Splits the byte array into subarrays wherever <i>sep</i> occurs, and returns the list of those arrays. If <i>sep</i> does not match anywhere in the byte array, split() returns a single-element list containing this byte array.</p>
 
840
<a name="//apple_ref/cpp/instm/QByteArray/squeeze" />
783
841
<h3 class="fn"><a name="squeeze"></a>void QByteArray::squeeze ()</h3>
784
842
<p>Releases any memory not required to store the array's data.</p>
785
843
<p>The sole purpose of this function is to provide a means of fine tuning <a href="qbytearray.html">QByteArray</a>'s memory usage. In general, you will rarely ever need to call this function.</p>
786
844
<p>See also <a href="qbytearray.html#reserve">reserve</a>() and <a href="qbytearray.html#capacity">capacity</a>().</p>
 
845
<a name="//apple_ref/cpp/instm/QByteArray/startsWith" />
787
846
<h3 class="fn"><a name="startsWith"></a>bool QByteArray::startsWith ( const QByteArray &amp; <i>ba</i> ) const</h3>
788
847
<p>Returns true if this byte array starts with byte array <i>ba</i>; otherwise returns false.</p>
789
848
<p>Example:</p>
790
 
<pre> QByteArray url(&quot;ftp:<span class="comment">//ftp.trolltech.com/&quot;);</span>
 
849
<pre> QByteArray url(&quot;ftp:<span class="comment">//ftp.qt.nokia.com/&quot;);</span>
791
850
 if (url.startsWith(&quot;ftp:&quot;))
792
851
     ...</pre>
793
852
<p>See also <a href="qbytearray.html#endsWith">endsWith</a>() and <a href="qbytearray.html#left">left</a>().</p>
797
856
<h3 class="fn"><a name="startsWith-3"></a>bool QByteArray::startsWith ( char <i>ch</i> ) const</h3>
798
857
<p>This is an overloaded function.</p>
799
858
<p>Returns true if this byte array starts with character <i>ch</i>; otherwise returns false.</p>
 
859
<a name="//apple_ref/cpp/instm/QByteArray/toBase64" />
800
860
<h3 class="fn"><a name="toBase64"></a>QByteArray QByteArray::toBase64 () const</h3>
801
861
<p>Returns a copy of the byte array, encoded as Base64.</p>
802
862
<pre> QByteArray text(&quot;Qt is great!&quot;);
803
863
 text.toBase64();        <span class="comment">// returns &quot;UXQgaXMgZ3JlYXQh&quot;</span></pre>
804
864
<p>The algorithm used to encode Base64-encoded data is defined in <a href="http://www.rfc-editor.org/rfc/rfc2045.txt">RFC 2045</a>.</p>
805
865
<p>See also <a href="qbytearray.html#fromBase64">fromBase64</a>().</p>
 
866
<a name="//apple_ref/cpp/instm/QByteArray/toDouble" />
806
867
<h3 class="fn"><a name="toDouble"></a>double QByteArray::toDouble ( bool * <i>ok</i> = 0 ) const</h3>
807
868
<p>Returns the byte array converted to a <tt>double</tt> value.</p>
808
869
<p>Returns 0.0 if the conversion fails.</p>
811
872
 double a = string.toDouble();   <span class="comment">// a == 1234.56</span></pre>
812
873
<p><b>Note:</b> The conversion of the number is performed in the default C locale, irrespective of the user's locale.</p>
813
874
<p>See also <a href="qbytearray.html#number">number</a>().</p>
 
875
<a name="//apple_ref/cpp/instm/QByteArray/toFloat" />
814
876
<h3 class="fn"><a name="toFloat"></a>float QByteArray::toFloat ( bool * <i>ok</i> = 0 ) const</h3>
815
877
<p>Returns the byte array converted to a <tt>float</tt> value.</p>
816
878
<p>Returns 0.0 if the conversion fails.</p>
817
879
<p>If <i>ok</i> is not 0: if a conversion error occurs, *<i>ok</i> is set to false; otherwise *<i>ok</i> is set to true.</p>
818
880
<p><b>Note:</b> The conversion of the number is performed in the default C locale, irrespective of the user's locale.</p>
819
881
<p>See also <a href="qbytearray.html#number">number</a>().</p>
 
882
<a name="//apple_ref/cpp/instm/QByteArray/toHex" />
820
883
<h3 class="fn"><a name="toHex"></a>QByteArray QByteArray::toHex () const</h3>
821
884
<p>Returns a hex encoded copy of the byte array. The hex encoding uses the numbers 0-9 and the letters a-f.</p>
822
885
<p>See also <a href="qbytearray.html#fromHex">fromHex</a>().</p>
 
886
<a name="//apple_ref/cpp/instm/QByteArray/toInt" />
823
887
<h3 class="fn"><a name="toInt"></a>int QByteArray::toInt ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</h3>
824
888
<p>Returns the byte array converted to an <tt>int</tt> using base <i>base</i>, which is 10 by default and must be between 2 and 36, or 0.</p>
825
889
<p>If <i>base</i> is 0, the base is determined automatically using the following rules: If the byte array begins with &quot;0x&quot;, it is assumed to be hexadecimal; if it begins with &quot;0&quot;, it is assumed to be octal; otherwise it is assumed to be decimal.</p>
831
895
 int dec = str.toInt(&amp;ok, 10);     <span class="comment">// dec == 0, ok == false</span></pre>
832
896
<p><b>Note:</b> The conversion of the number is performed in the default C locale, irrespective of the user's locale.</p>
833
897
<p>See also <a href="qbytearray.html#number">number</a>().</p>
 
898
<a name="//apple_ref/cpp/instm/QByteArray/toLong" />
834
899
<h3 class="fn"><a name="toLong"></a>long QByteArray::toLong ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</h3>
835
900
<p>Returns the byte array converted to a <tt>long</tt> int using base <i>base</i>, which is 10 by default and must be between 2 and 36, or 0.</p>
836
901
<p>If <i>base</i> is 0, the base is determined automatically using the following rules: If the byte array begins with &quot;0x&quot;, it is assumed to be hexadecimal; if it begins with &quot;0&quot;, it is assumed to be octal; otherwise it is assumed to be decimal.</p>
843
908
<p><b>Note:</b> The conversion of the number is performed in the default C locale, irrespective of the user's locale.</p>
844
909
<p>This function was introduced in Qt 4.1.</p>
845
910
<p>See also <a href="qbytearray.html#number">number</a>().</p>
 
911
<a name="//apple_ref/cpp/instm/QByteArray/toLongLong" />
846
912
<h3 class="fn"><a name="toLongLong"></a><a href="qtglobal.html#qlonglong-typedef">qlonglong</a> QByteArray::toLongLong ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</h3>
847
913
<p>Returns the byte array converted to a <tt>long long</tt> using base <i>base</i>, which is 10 by default and must be between 2 and 36, or 0.</p>
848
914
<p>If <i>base</i> is 0, the base is determined automatically using the following rules: If the byte array begins with &quot;0x&quot;, it is assumed to be hexadecimal; if it begins with &quot;0&quot;, it is assumed to be octal; otherwise it is assumed to be decimal.</p>
850
916
<p>If <i>ok</i> is not 0: if a conversion error occurs, *<i>ok</i> is set to false; otherwise *<i>ok</i> is set to true.</p>
851
917
<p><b>Note:</b> The conversion of the number is performed in the default C locale, irrespective of the user's locale.</p>
852
918
<p>See also <a href="qbytearray.html#number">number</a>().</p>
 
919
<a name="//apple_ref/cpp/instm/QByteArray/toLower" />
853
920
<h3 class="fn"><a name="toLower"></a>QByteArray QByteArray::toLower () const</h3>
854
921
<p>Returns a lowercase copy of the byte array. The bytearray is interpreted as a Latin-1 encoded string.</p>
855
922
<p>Example:</p>
856
 
<pre> QByteArray x(&quot;TROlltECH&quot;);
 
923
<pre> QByteArray x(&quot;Qt by NOKIA&quot;);
857
924
 QByteArray y = x.toLower();
858
 
<span class="comment"> // y == &quot;trolltech&quot;</span></pre>
 
925
<span class="comment"> // y == &quot;qt by nokia&quot;</span></pre>
859
926
<p>See also <a href="qbytearray.html#toUpper">toUpper</a>() and <a href="qbytearray.html#8-bit-character-comparisons">8-bit Character Comparisons</a>.</p>
 
927
<a name="//apple_ref/cpp/instm/QByteArray/toPercentEncoding" />
860
928
<h3 class="fn"><a name="toPercentEncoding"></a>QByteArray QByteArray::toPercentEncoding ( const QByteArray &amp; <i>exclude</i> = QByteArray(), const QByteArray &amp; <i>include</i> = QByteArray(), char <i>percent</i> = '%' ) const</h3>
861
929
<p>Returns a URI/URL-style percent-encoded copy of this byte array. The <i>percent</i> parameter allows you to override the default '%' character for another.</p>
862
930
<p>By default, this function will encode all characters that are not one of the following:</p>
863
 
<p>ALPHA (&quot;a&quot; to &quot;z&quot; and &quot;A&quot; to &quot;Z&quot;) / DIGIT (0 to 9) / &quot;-&quot; / &quot;.&quot; / &quot;_&quot; / &quot;~&quot;</p>
 
931
<p>ALPHA (&quot;a&quot; to &quot;z&quot; and &quot;A&quot; to &quot;Z&quot;) / DIGIT (0 to 9) / &quot;-&quot; / &quot;.&quot; / &quot;<a href="examples-overview.html">_</a>&quot; / &quot;~&quot;</p>
864
932
<p>To prevent characters from being encoded pass them to <i>exclude</i>. To force characters to be encoded pass them to <i>include</i>. The <i>percent</i> character is always encoded.</p>
865
933
<p>Example:</p>
866
934
<pre> QByteArray text = &quot;{a fishy string?}&quot;;
870
938
<p>The hex encoding uses the numbers 0-9 and the uppercase letters A-F.</p>
871
939
<p>This function was introduced in Qt 4.4.</p>
872
940
<p>See also <a href="qbytearray.html#fromPercentEncoding">fromPercentEncoding</a>() and <a href="qurl.html#toPercentEncoding">QUrl::toPercentEncoding</a>().</p>
 
941
<a name="//apple_ref/cpp/instm/QByteArray/toShort" />
873
942
<h3 class="fn"><a name="toShort"></a>short QByteArray::toShort ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</h3>
874
943
<p>Returns the byte array converted to a <tt>short</tt> using base <i>base</i>, which is 10 by default and must be between 2 and 36, or 0.</p>
875
944
<p>If <i>base</i> is 0, the base is determined automatically using the following rules: If the byte array begins with &quot;0x&quot;, it is assumed to be hexadecimal; if it begins with &quot;0&quot;, it is assumed to be octal; otherwise it is assumed to be decimal.</p>
877
946
<p>If <i>ok</i> is not 0: if a conversion error occurs, *<i>ok</i> is set to false; otherwise *<i>ok</i> is set to true.</p>
878
947
<p><b>Note:</b> The conversion of the number is performed in the default C locale, irrespective of the user's locale.</p>
879
948
<p>See also <a href="qbytearray.html#number">number</a>().</p>
 
949
<a name="//apple_ref/cpp/instm/QByteArray/toUInt" />
880
950
<h3 class="fn"><a name="toUInt"></a><a href="qtglobal.html#uint-typedef">uint</a> QByteArray::toUInt ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</h3>
881
951
<p>Returns the byte array converted to an <tt>unsigned int</tt> using base <i>base</i>, which is 10 by default and must be between 2 and 36, or 0.</p>
882
952
<p>If <i>base</i> is 0, the base is determined automatically using the following rules: If the byte array begins with &quot;0x&quot;, it is assumed to be hexadecimal; if it begins with &quot;0&quot;, it is assumed to be octal; otherwise it is assumed to be decimal.</p>
884
954
<p>If <i>ok</i> is not 0: if a conversion error occurs, *<i>ok</i> is set to false; otherwise *<i>ok</i> is set to true.</p>
885
955
<p><b>Note:</b> The conversion of the number is performed in the default C locale, irrespective of the user's locale.</p>
886
956
<p>See also <a href="qbytearray.html#number">number</a>().</p>
 
957
<a name="//apple_ref/cpp/instm/QByteArray/toULong" />
887
958
<h3 class="fn"><a name="toULong"></a><a href="qtglobal.html#ulong-typedef">ulong</a> QByteArray::toULong ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</h3>
888
959
<p>Returns the byte array converted to an <tt>unsigned long int</tt> using base <i>base</i>, which is 10 by default and must be between 2 and 36, or 0.</p>
889
960
<p>If <i>base</i> is 0, the base is determined automatically using the following rules: If the byte array begins with &quot;0x&quot;, it is assumed to be hexadecimal; if it begins with &quot;0&quot;, it is assumed to be octal; otherwise it is assumed to be decimal.</p>
892
963
<p><b>Note:</b> The conversion of the number is performed in the default C locale, irrespective of the user's locale.</p>
893
964
<p>This function was introduced in Qt 4.1.</p>
894
965
<p>See also <a href="qbytearray.html#number">number</a>().</p>
 
966
<a name="//apple_ref/cpp/instm/QByteArray/toULongLong" />
895
967
<h3 class="fn"><a name="toULongLong"></a><a href="qtglobal.html#qulonglong-typedef">qulonglong</a> QByteArray::toULongLong ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</h3>
896
968
<p>Returns the byte array converted to an <tt>unsigned long long</tt> using base <i>base</i>, which is 10 by default and must be between 2 and 36, or 0.</p>
897
969
<p>If <i>base</i> is 0, the base is determined automatically using the following rules: If the byte array begins with &quot;0x&quot;, it is assumed to be hexadecimal; if it begins with &quot;0&quot;, it is assumed to be octal; otherwise it is assumed to be decimal.</p>
899
971
<p>If <i>ok</i> is not 0: if a conversion error occurs, *<i>ok</i> is set to false; otherwise *<i>ok</i> is set to true.</p>
900
972
<p><b>Note:</b> The conversion of the number is performed in the default C locale, irrespective of the user's locale.</p>
901
973
<p>See also <a href="qbytearray.html#number">number</a>().</p>
 
974
<a name="//apple_ref/cpp/instm/QByteArray/toUShort" />
902
975
<h3 class="fn"><a name="toUShort"></a><a href="qtglobal.html#ushort-typedef">ushort</a> QByteArray::toUShort ( bool * <i>ok</i> = 0, int <i>base</i> = 10 ) const</h3>
903
976
<p>Returns the byte array converted to an <tt>unsigned short</tt> using base <i>base</i>, which is 10 by default and must be between 2 and 36, or 0.</p>
904
977
<p>If <i>base</i> is 0, the base is determined automatically using the following rules: If the byte array begins with &quot;0x&quot;, it is assumed to be hexadecimal; if it begins with &quot;0&quot;, it is assumed to be octal; otherwise it is assumed to be decimal.</p>
906
979
<p>If <i>ok</i> is not 0: if a conversion error occurs, *<i>ok</i> is set to false; otherwise *<i>ok</i> is set to true.</p>
907
980
<p><b>Note:</b> The conversion of the number is performed in the default C locale, irrespective of the user's locale.</p>
908
981
<p>See also <a href="qbytearray.html#number">number</a>().</p>
 
982
<a name="//apple_ref/cpp/instm/QByteArray/toUpper" />
909
983
<h3 class="fn"><a name="toUpper"></a>QByteArray QByteArray::toUpper () const</h3>
910
984
<p>Returns an uppercase copy of the byte array. The bytearray is interpreted as a Latin-1 encoded string.</p>
911
985
<p>Example:</p>
912
 
<pre> QByteArray x(&quot;TROlltECH&quot;);
 
986
<pre> QByteArray x(&quot;Qt by NOKIA&quot;);
913
987
 QByteArray y = x.toUpper();
914
 
<span class="comment"> // y == &quot;TROLLTECH&quot;</span></pre>
 
988
<span class="comment"> // y == &quot;QT BY NOKIA&quot;</span></pre>
915
989
<p>See also <a href="qbytearray.html#toLower">toLower</a>() and <a href="qbytearray.html#8-bit-character-comparisons">8-bit Character Comparisons</a>.</p>
 
990
<a name="//apple_ref/cpp/instm/QByteArray/trimmed" />
916
991
<h3 class="fn"><a name="trimmed"></a>QByteArray QByteArray::trimmed () const</h3>
917
992
<p>Returns a byte array that has whitespace removed from the start and the end.</p>
918
993
<p>Whitespace means any character for which the standard C++ isspace() function returns true. This includes the ASCII characters '\t', '\n', '\v', '\f', '\r', and ' '.</p>
922
997
<span class="comment"> // ba == &quot;lots\t of\nwhitespace&quot;;</span></pre>
923
998
<p>Unlike <a href="qbytearray.html#simplified">simplified</a>(), trimmed() leaves internal whitespace alone.</p>
924
999
<p>See also <a href="qbytearray.html#simplified">simplified</a>().</p>
 
1000
<a name="//apple_ref/cpp/instm/QByteArray/truncate" />
925
1001
<h3 class="fn"><a name="truncate"></a>void QByteArray::truncate ( int <i>pos</i> )</h3>
926
1002
<p>Truncates the byte array at index position <i>pos</i>.</p>
927
1003
<p>If <i>pos</i> is beyond the end of the array, nothing happens.</p>
929
1005
<pre> QByteArray ba(&quot;Stockholm&quot;);
930
1006
 ba.truncate(5);             <span class="comment">// ba == &quot;Stock&quot;</span></pre>
931
1007
<p>See also <a href="qbytearray.html#chop">chop</a>(), <a href="qbytearray.html#resize">resize</a>(), and <a href="qbytearray.html#left">left</a>().</p>
 
1008
<a name="//apple_ref/cpp/instm/QByteArray/operator const char *" />
932
1009
<h3 class="fn"><a name="operator-const-char--2a"></a>QByteArray::operator const char * () const</h3>
933
1010
<p>Returns a pointer to the data stored in the byte array. The pointer can be used to access the bytes that compose the array. The data is '\0'-terminated. The pointer remains valid as long as the array isn't reallocated or destroyed.</p>
934
1011
<p>This operator is mostly useful to pass a byte array to a function that accepts a <tt>const char *</tt>.</p>
935
1012
<p>You can disable this operator by defining <tt>QT_NO_CAST_FROM_BYTEARRAY</tt> when you compile your applications.</p>
936
1013
<p>Note: A <a href="qbytearray.html">QByteArray</a> can store any byte values including '\0's, but most functions that take <tt>char *</tt> arguments assume that the data ends at the first '\0' they encounter.</p>
937
1014
<p>See also <a href="qbytearray.html#constData">constData</a>().</p>
 
1015
<a name="//apple_ref/cpp/instm/QByteArray/operator const void *" />
938
1016
<h3 class="fn"><a name="operator-const-void--2a"></a>QByteArray::operator const void * () const</h3>
939
1017
<p>Returns a pointer to the data stored in the byte array. The pointer can be used to access the bytes that compose the array. The data is '\0'-terminated. The pointer remains valid as long as the array isn't reallocated or destroyed.</p>
940
1018
<p>This operator is mostly useful to pass a byte array to a function that accepts a <tt>const char *</tt>.</p>
941
1019
<p>You can disable this operator by defining <tt>QT_NO_CAST_FROM_BYTEARRAY</tt> when you compile your applications.</p>
942
1020
<p>Note: A <a href="qbytearray.html">QByteArray</a> can store any byte values including '\0's, but most functions that take <tt>char *</tt> arguments assume that the data ends at the first '\0' they encounter.</p>
943
1021
<p>See also <a href="qbytearray.html#constData">constData</a>().</p>
 
1022
<a name="//apple_ref/cpp/instm/QByteArray/operator!=" />
944
1023
<h3 class="fn"><a name="operator-not-eq"></a>bool QByteArray::operator!= ( const <a href="qstring.html">QString</a> &amp; <i>str</i> ) const</h3>
945
1024
<p>Returns true if this byte array is not equal to string <i>str</i>; otherwise returns false.</p>
946
1025
<p>The Unicode data is converted into 8-bit characters using <a href="qstring.html#toAscii">QString::toAscii</a>().</p>
947
1026
<p>The comparison is case sensitive.</p>
948
1027
<p>You can disable this operator by defining <tt>QT_NO_CAST_FROM_ASCII</tt> when you compile your applications. You then need to call <a href="qstring.html#fromAscii">QString::fromAscii</a>(), <a href="qstring.html#fromLatin1">QString::fromLatin1</a>(), <a href="qstring.html#fromUtf8">QString::fromUtf8</a>(), or <a href="qstring.html#fromLocal8Bit">QString::fromLocal8Bit</a>() explicitly if you want to convert the byte array to a <a href="qstring.html">QString</a> before doing the comparison.</p>
 
1028
<a name="//apple_ref/cpp/instm/QByteArray/operator+=" />
949
1029
<h3 class="fn"><a name="operator-2b-eq"></a>QByteArray &amp; QByteArray::operator+= ( const QByteArray &amp; <i>ba</i> )</h3>
950
1030
<p>Appends the byte array <i>ba</i> onto the end of this byte array and returns a reference to this byte array.</p>
951
1031
<p>Example:</p>
965
1045
<h3 class="fn"><a name="operator-2b-eq-4"></a>QByteArray &amp; QByteArray::operator+= ( char <i>ch</i> )</h3>
966
1046
<p>This is an overloaded function.</p>
967
1047
<p>Appends the character <i>ch</i> onto the end of this byte array and returns a reference to this byte array.</p>
 
1048
<a name="//apple_ref/cpp/instm/QByteArray/operator<" />
968
1049
<h3 class="fn"><a name="operator-lt"></a>bool QByteArray::operator&lt; ( const <a href="qstring.html">QString</a> &amp; <i>str</i> ) const</h3>
969
1050
<p>Returns true if this byte array is lexically less than string <i>str</i>; otherwise returns false.</p>
970
1051
<p>The Unicode data is converted into 8-bit characters using <a href="qstring.html#toAscii">QString::toAscii</a>().</p>
971
1052
<p>The comparison is case sensitive.</p>
972
1053
<p>You can disable this operator by defining <tt>QT_NO_CAST_FROM_ASCII</tt> when you compile your applications. You then need to call <a href="qstring.html#fromAscii">QString::fromAscii</a>(), <a href="qstring.html#fromLatin1">QString::fromLatin1</a>(), <a href="qstring.html#fromUtf8">QString::fromUtf8</a>(), or <a href="qstring.html#fromLocal8Bit">QString::fromLocal8Bit</a>() explicitly if you want to convert the byte array to a <a href="qstring.html">QString</a> before doing the comparison.</p>
 
1054
<a name="//apple_ref/cpp/instm/QByteArray/operator<=" />
973
1055
<h3 class="fn"><a name="operator-lt-eq"></a>bool QByteArray::operator&lt;= ( const <a href="qstring.html">QString</a> &amp; <i>str</i> ) const</h3>
974
1056
<p>Returns true if this byte array is lexically less than or equal to string <i>str</i>; otherwise returns false.</p>
975
1057
<p>The Unicode data is converted into 8-bit characters using <a href="qstring.html#toAscii">QString::toAscii</a>().</p>
976
1058
<p>The comparison is case sensitive.</p>
977
1059
<p>You can disable this operator by defining <tt>QT_NO_CAST_FROM_ASCII</tt> when you compile your applications. You then need to call <a href="qstring.html#fromAscii">QString::fromAscii</a>(), <a href="qstring.html#fromLatin1">QString::fromLatin1</a>(), <a href="qstring.html#fromUtf8">QString::fromUtf8</a>(), or <a href="qstring.html#fromLocal8Bit">QString::fromLocal8Bit</a>() explicitly if you want to convert the byte array to a <a href="qstring.html">QString</a> before doing the comparison.</p>
 
1060
<a name="//apple_ref/cpp/instm/QByteArray/operator=" />
978
1061
<h3 class="fn"><a name="operator-eq"></a>QByteArray &amp; QByteArray::operator= ( const QByteArray &amp; <i>other</i> )</h3>
979
1062
<p>Assigns <i>other</i> to this byte array and returns a reference to this byte array.</p>
980
1063
<h3 class="fn"><a name="operator-eq-2"></a>QByteArray &amp; QByteArray::operator= ( const char * <i>str</i> )</h3>
981
1064
<p>This is an overloaded function.</p>
982
1065
<p>Assigns <i>str</i> to this byte array.</p>
 
1066
<a name="//apple_ref/cpp/instm/QByteArray/operator==" />
983
1067
<h3 class="fn"><a name="operator-eq-eq"></a>bool QByteArray::operator== ( const <a href="qstring.html">QString</a> &amp; <i>str</i> ) const</h3>
984
1068
<p>Returns true if this byte array is equal to string <i>str</i>; otherwise returns false.</p>
985
1069
<p>The Unicode data is converted into 8-bit characters using <a href="qstring.html#toAscii">QString::toAscii</a>().</p>
986
1070
<p>The comparison is case sensitive.</p>
987
1071
<p>You can disable this operator by defining <tt>QT_NO_CAST_FROM_ASCII</tt> when you compile your applications. You then need to call <a href="qstring.html#fromAscii">QString::fromAscii</a>(), <a href="qstring.html#fromLatin1">QString::fromLatin1</a>(), <a href="qstring.html#fromUtf8">QString::fromUtf8</a>(), or <a href="qstring.html#fromLocal8Bit">QString::fromLocal8Bit</a>() explicitly if you want to convert the byte array to a <a href="qstring.html">QString</a> before doing the comparison.</p>
 
1072
<a name="//apple_ref/cpp/instm/QByteArray/operator>" />
988
1073
<h3 class="fn"><a name="operator-gt"></a>bool QByteArray::operator&gt; ( const <a href="qstring.html">QString</a> &amp; <i>str</i> ) const</h3>
989
1074
<p>Returns true if this byte array is lexically greater than string <i>str</i>; otherwise returns false.</p>
990
1075
<p>The Unicode data is converted into 8-bit characters using <a href="qstring.html#toAscii">QString::toAscii</a>().</p>
991
1076
<p>The comparison is case sensitive.</p>
992
1077
<p>You can disable this operator by defining <tt>QT_NO_CAST_FROM_ASCII</tt> when you compile your applications. You then need to call <a href="qstring.html#fromAscii">QString::fromAscii</a>(), <a href="qstring.html#fromLatin1">QString::fromLatin1</a>(), <a href="qstring.html#fromUtf8">QString::fromUtf8</a>(), or <a href="qstring.html#fromLocal8Bit">QString::fromLocal8Bit</a>() explicitly if you want to convert the byte array to a <a href="qstring.html">QString</a> before doing the comparison.</p>
 
1078
<a name="//apple_ref/cpp/instm/QByteArray/operator>=" />
993
1079
<h3 class="fn"><a name="operator-gt-eq"></a>bool QByteArray::operator&gt;= ( const <a href="qstring.html">QString</a> &amp; <i>str</i> ) const</h3>
994
1080
<p>Returns true if this byte array is greater than or equal to string <i>str</i>; otherwise returns false.</p>
995
1081
<p>The Unicode data is converted into 8-bit characters using <a href="qstring.html#toAscii">QString::toAscii</a>().</p>
996
1082
<p>The comparison is case sensitive.</p>
997
1083
<p>You can disable this operator by defining <tt>QT_NO_CAST_FROM_ASCII</tt> when you compile your applications. You then need to call <a href="qstring.html#fromAscii">QString::fromAscii</a>(), <a href="qstring.html#fromLatin1">QString::fromLatin1</a>(), <a href="qstring.html#fromUtf8">QString::fromUtf8</a>(), or <a href="qstring.html#fromLocal8Bit">QString::fromLocal8Bit</a>() explicitly if you want to convert the byte array to a <a href="qstring.html">QString</a> before doing the comparison.</p>
 
1084
<a name="//apple_ref/cpp/instm/QByteArray/operator[]" />
998
1085
<h3 class="fn"><a name="operator-5b-5d"></a>QByteRef QByteArray::operator[] ( int <i>i</i> )</h3>
999
1086
<p>Returns the byte at index position <i>i</i> as a modifiable reference.</p>
1000
1087
<p>If an assignment is made beyond the end of the byte array, the array is extended with <a href="qbytearray.html#resize">resize</a>() before the assignment takes place.</p>
1014
1101
<p>This is an overloaded function.</p>
1015
1102
<hr />
1016
1103
<h2>Related Non-Members</h2>
 
1104
<a name="//apple_ref/cpp/func//qChecksum" />
1017
1105
<h3 class="fn"><a name="qChecksum"></a><a href="qtglobal.html#quint16-typedef">quint16</a> qChecksum ( const char * <i>data</i>, <a href="qtglobal.html#uint-typedef">uint</a> <i>len</i> )</h3>
1018
1106
<p>Returns the CRC-16 checksum of the first <i>len</i> bytes of <i>data</i>.</p>
1019
1107
<p>The checksum is independent of the byte order (endianness).</p>
1020
1108
<p><b>Note:</b> This function is a 16-bit cache conserving (16 entry table) implementation of the CRC-16-CCITT algorithm.</p>
 
1109
<a name="//apple_ref/cpp/func//qCompress" />
1021
1110
<h3 class="fn"><a name="qCompress"></a>QByteArray qCompress ( const QByteArray &amp; <i>data</i>, int <i>compressionLevel</i> = -1 )</h3>
1022
1111
<p>Compresses the <i>data</i> byte array and returns the compressed data in a new byte array.</p>
1023
1112
<p>The <i>compressionLevel</i> parameter specifies how much compression should be used. Valid values are between 0 and 9, with 9 corresponding to the greatest compression (i.e&#x2e; smaller compressed data) at the cost of using a slower algorithm. Smaller values (8, 7, ..&#x2e;, 1) provide successively less compression at slightly faster speeds. The value 0 corresponds to no compression at all. The default value is -1, which specifies zlib's default compression.</p>
1025
1114
<h3 class="fn"><a name="qCompress-2"></a>QByteArray qCompress ( const <a href="qtglobal.html#uchar-typedef">uchar</a> * <i>data</i>, int <i>nbytes</i>, int <i>compressionLevel</i> = -1 )</h3>
1026
1115
<p>This is an overloaded function.</p>
1027
1116
<p>Compresses the first <i>nbytes</i> of <i>data</i> and returns the compressed data in a new byte array.</p>
 
1117
<a name="//apple_ref/cpp/func//qUncompress" />
1028
1118
<h3 class="fn"><a name="qUncompress"></a>QByteArray qUncompress ( const QByteArray &amp; <i>data</i> )</h3>
1029
1119
<p>Uncompresses the <i>data</i> byte array and returns a new byte array with the uncompressed data.</p>
1030
1120
<p>Returns an empty <a href="qbytearray.html">QByteArray</a> if the input data was corrupt.</p>
1034
1124
<h3 class="fn"><a name="qUncompress-2"></a>QByteArray qUncompress ( const <a href="qtglobal.html#uchar-typedef">uchar</a> * <i>data</i>, int <i>nbytes</i> )</h3>
1035
1125
<p>This is an overloaded function.</p>
1036
1126
<p>Uncompresses the first <i>nbytes</i> of <i>data</i> and returns a new byte array with the uncompressed data.</p>
 
1127
<a name="//apple_ref/cpp/func//qsnprintf" />
1037
1128
<h3 class="fn"><a name="qsnprintf"></a>int qsnprintf ( char * <i>str</i>, size_t <i>n</i>, const char * <i>fmt</i>, ... )</h3>
1038
1129
<p>A portable snprintf() function, calls qvsnprintf.</p>
1039
1130
<p><i>fmt</i> is the <tt>printf()</tt> format string. The result is put into <i>str</i>, which is a buffer of at least <i>n</i> bytes.</p>
1040
1131
<p><b>Warning:</b> Call this function only when you know what you are doing since it shows different behavior on certain platforms. Use <a href="qstring.html#sprintf">QString::sprintf</a>() to format a string instead.</p>
1041
1132
<p>See also <a href="qbytearray.html#qvsnprintf">qvsnprintf</a>() and <a href="qstring.html#sprintf">QString::sprintf</a>().</p>
 
1133
<a name="//apple_ref/cpp/func//qstrcmp" />
1042
1134
<h3 class="fn"><a name="qstrcmp"></a>int qstrcmp ( const char * <i>str1</i>, const char * <i>str2</i> )</h3>
1043
1135
<p>A safe <tt>strcmp()</tt> function.</p>
1044
1136
<p>Compares <i>str1</i> and <i>str2</i>. Returns a negative value if <i>str1</i> is less than <i>str2</i>, 0 if <i>str1</i> is equal to <i>str2</i> or a positive value if <i>str1</i> is greater than <i>str2</i>.</p>
1045
1137
<p>Special case 1: Returns 0 if <i>str1</i> and <i>str2</i> are both 0.</p>
1046
1138
<p>Special case 2: Returns an arbitrary non-zero value if <i>str1</i> is 0 or <i>str2</i> is 0 (but not both).</p>
1047
1139
<p>See also <a href="qbytearray.html#qstrncmp">qstrncmp</a>(), <a href="qbytearray.html#qstricmp">qstricmp</a>(), <a href="qbytearray.html#qstrnicmp">qstrnicmp</a>(), and <a href="qbytearray.html#8-bit-character-comparisons">8-bit Character Comparisons</a>.</p>
 
1140
<a name="//apple_ref/cpp/func//qstrcpy" />
1048
1141
<h3 class="fn"><a name="qstrcpy"></a>char * qstrcpy ( char * <i>dst</i>, const char * <i>src</i> )</h3>
1049
1142
<p>Copies all the characters up to and including the '\0' from <i>src</i> into <i>dst</i> and returns a pointer to <i>dst</i>. If <i>src</i> is 0, it immediately returns 0.</p>
1050
1143
<p>This function assumes that <i>dst</i> is large enough to hold the contents of <i>src</i>.</p>
1051
1144
<p>See also <a href="qbytearray.html#qstrncpy">qstrncpy</a>().</p>
 
1145
<a name="//apple_ref/cpp/func//qstrdup" />
1052
1146
<h3 class="fn"><a name="qstrdup"></a>char * qstrdup ( const char * <i>src</i> )</h3>
1053
1147
<p>Returns a duplicate string.</p>
1054
1148
<p>Allocates space for a copy of <i>src</i>, copies it, and returns a pointer to the copy. If <i>src</i> is 0, it immediately returns 0.</p>
1055
1149
<p>Ownership is passed to the caller, so the returned string must be deleted using <tt>delete[]</tt>.</p>
 
1150
<a name="//apple_ref/cpp/func//qstricmp" />
1056
1151
<h3 class="fn"><a name="qstricmp"></a>int qstricmp ( const char * <i>str1</i>, const char * <i>str2</i> )</h3>
1057
1152
<p>A safe <tt>stricmp()</tt> function.</p>
1058
1153
<p>Compares <i>str1</i> and <i>str2</i> ignoring the case of the characters. The encoding of the strings is assumed to be Latin-1.</p>
1060
1155
<p>Special case 1: Returns 0 if <i>str1</i> and <i>str2</i> are both 0.</p>
1061
1156
<p>Special case 2: Returns a random non-zero value if <i>str1</i> is 0 or <i>str2</i> is 0 (but not both).</p>
1062
1157
<p>See also <a href="qbytearray.html#qstrcmp">qstrcmp</a>(), <a href="qbytearray.html#qstrncmp">qstrncmp</a>(), <a href="qbytearray.html#qstrnicmp">qstrnicmp</a>(), and <a href="qbytearray.html#8-bit-character-comparisons">8-bit Character Comparisons</a>.</p>
 
1158
<a name="//apple_ref/cpp/func//qstrlen" />
1063
1159
<h3 class="fn"><a name="qstrlen"></a><a href="qtglobal.html#uint-typedef">uint</a> qstrlen ( const char * <i>str</i> )</h3>
1064
1160
<p>A safe <tt>strlen()</tt> function.</p>
1065
1161
<p>Returns the number of characters that precede the terminating '\0', or 0 if <i>str</i> is 0.</p>
1066
1162
<p>See also <a href="qbytearray.html#qstrnlen">qstrnlen</a>().</p>
 
1163
<a name="//apple_ref/cpp/func//qstrncmp" />
1067
1164
<h3 class="fn"><a name="qstrncmp"></a>int qstrncmp ( const char * <i>str1</i>, const char * <i>str2</i>, <a href="qtglobal.html#uint-typedef">uint</a> <i>len</i> )</h3>
1068
1165
<p>A safe <tt>strncmp()</tt> function.</p>
1069
1166
<p>Compares at most <i>len</i> bytes of <i>str1</i> and <i>str2</i>.</p>
1071
1168
<p>Special case 1: Returns 0 if <i>str1</i> and <i>str2</i> are both 0.</p>
1072
1169
<p>Special case 2: Returns a random non-zero value if <i>str1</i> is 0 or <i>str2</i> is 0 (but not both).</p>
1073
1170
<p>See also <a href="qbytearray.html#qstrcmp">qstrcmp</a>(), <a href="qbytearray.html#qstricmp">qstricmp</a>(), <a href="qbytearray.html#qstrnicmp">qstrnicmp</a>(), and <a href="qbytearray.html#8-bit-character-comparisons">8-bit Character Comparisons</a>.</p>
 
1171
<a name="//apple_ref/cpp/func//qstrncpy" />
1074
1172
<h3 class="fn"><a name="qstrncpy"></a>char * qstrncpy ( char * <i>dst</i>, const char * <i>src</i>, <a href="qtglobal.html#uint-typedef">uint</a> <i>len</i> )</h3>
1075
1173
<p>A safe <tt>strncpy()</tt> function.</p>
1076
1174
<p>Copies at most <i>len</i> bytes from <i>src</i> (stopping at <i>len</i> or the terminating '\0' whichever comes first) into <i>dst</i> and returns a pointer to <i>dst</i>. Guarantees that <i>dst</i> is '\0'-terminated. If <i>src</i> or <i>dst</i> is 0, returns 0 immediately.</p>
1077
1175
<p>This function assumes that <i>dst</i> is at least <i>len</i> characters long.</p>
1078
1176
<p>See also <a href="qbytearray.html#qstrcpy">qstrcpy</a>().</p>
 
1177
<a name="//apple_ref/cpp/func//qstrnicmp" />
1079
1178
<h3 class="fn"><a name="qstrnicmp"></a>int qstrnicmp ( const char * <i>str1</i>, const char * <i>str2</i>, <a href="qtglobal.html#uint-typedef">uint</a> <i>len</i> )</h3>
1080
1179
<p>A safe <tt>strnicmp()</tt> function.</p>
1081
1180
<p>Compares at most <i>len</i> bytes of <i>str1</i> and <i>str2</i> ignoring the case of the characters. The encoding of the strings is assumed to be Latin-1.</p>
1083
1182
<p>Special case 1: Returns 0 if <i>str1</i> and <i>str2</i> are both 0.</p>
1084
1183
<p>Special case 2: Returns a random non-zero value if <i>str1</i> is 0 or <i>str2</i> is 0 (but not both).</p>
1085
1184
<p>See also <a href="qbytearray.html#qstrcmp">qstrcmp</a>(), <a href="qbytearray.html#qstrncmp">qstrncmp</a>(), <a href="qbytearray.html#qstricmp">qstricmp</a>(), and <a href="qbytearray.html#8-bit-character-comparisons">8-bit Character Comparisons</a>.</p>
 
1185
<a name="//apple_ref/cpp/func//qstrnlen" />
1086
1186
<h3 class="fn"><a name="qstrnlen"></a><a href="qtglobal.html#uint-typedef">uint</a> qstrnlen ( const char * <i>str</i>, <a href="qtglobal.html#uint-typedef">uint</a> <i>maxlen</i> )</h3>
1087
1187
<p>A safe <tt>strnlen()</tt> function.</p>
1088
1188
<p>Returns the number of characters that precede the terminating '\0', but at most <i>maxlen</i>. If <i>str</i> is 0, returns 0.</p>
1089
1189
<p>This function was introduced in Qt 4.2.</p>
1090
1190
<p>See also <a href="qbytearray.html#qstrlen">qstrlen</a>().</p>
 
1191
<a name="//apple_ref/cpp/func//qvsnprintf" />
1091
1192
<h3 class="fn"><a name="qvsnprintf"></a>int qvsnprintf ( char * <i>str</i>, size_t <i>n</i>, const char * <i>fmt</i>, va_list <i>ap</i> )</h3>
1092
1193
<p>A portable <tt>vsnprintf()</tt> function. Will call <tt>::vsnprintf()</tt>, <tt>::_vsnprintf()</tt>, or <tt>::vsnprintf_s</tt> depending on the system, or fall back to an internal version.</p>
1093
1194
<p><i>fmt</i> is the <tt>printf()</tt> format string. The result is put into <i>str</i>, which is a buffer of at least <i>n</i> bytes.</p>
1095
1196
<p><b>Warning:</b> Since vsnprintf() shows different behavior on certain platforms, you should not rely on the return value or on the fact that you will always get a 0 terminated string back.</p>
1096
1197
<p>Ideally, you should never call this function but use <a href="qstring.html#sprintf">QString::sprintf</a>() instead.</p>
1097
1198
<p>See also <a href="qbytearray.html#qsnprintf">qsnprintf</a>() and <a href="qstring.html#sprintf">QString::sprintf</a>().</p>
1098
 
<h3 class="fn"><a name="operator-not-eq-52"></a>bool operator!= ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
 
1199
<h3 class="fn"><a name="operator-not-eq-59"></a>bool operator!= ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
1099
1200
<p>This is an overloaded function.</p>
1100
1201
<p>Returns true if byte array <i>a1</i> is not equal to byte array <i>a2</i>; otherwise returns false.</p>
1101
 
<h3 class="fn"><a name="operator-not-eq-53"></a>bool operator!= ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</h3>
 
1202
<h3 class="fn"><a name="operator-not-eq-60"></a>bool operator!= ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</h3>
1102
1203
<p>This is an overloaded function.</p>
1103
1204
<p>Returns true if byte array <i>a1</i> is not equal to string <i>a2</i>; otherwise returns false.</p>
1104
 
<h3 class="fn"><a name="operator-not-eq-54"></a>bool operator!= ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
 
1205
<h3 class="fn"><a name="operator-not-eq-61"></a>bool operator!= ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
1105
1206
<p>This is an overloaded function.</p>
1106
1207
<p>Returns true if string <i>a1</i> is not equal to byte array <i>a2</i>; otherwise returns false.</p>
1107
 
<h3 class="fn"><a name="operator-2b-38"></a>const QByteArray operator+ ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</h3>
 
1208
<h3 class="fn"><a name="operator-2b-40"></a>const QByteArray operator+ ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</h3>
1108
1209
<p>This is an overloaded function.</p>
1109
1210
<p>Returns a byte array that is the result of concatenating byte array <i>a1</i> and string <i>a2</i>.</p>
1110
 
<h3 class="fn"><a name="operator-2b-39"></a>const QByteArray operator+ ( const QByteArray &amp; <i>a1</i>, char <i>a2</i> )</h3>
 
1211
<h3 class="fn"><a name="operator-2b-41"></a>const QByteArray operator+ ( const QByteArray &amp; <i>a1</i>, char <i>a2</i> )</h3>
1111
1212
<p>This is an overloaded function.</p>
1112
1213
<p>Returns a byte array that is the result of concatenating byte array <i>a1</i> and character <i>a2</i>.</p>
1113
 
<h3 class="fn"><a name="operator-2b-40"></a>const QByteArray operator+ ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
 
1214
<h3 class="fn"><a name="operator-2b-42"></a>const QByteArray operator+ ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
1114
1215
<p>This is an overloaded function.</p>
1115
1216
<p>Returns a byte array that is the result of concatenating string <i>a1</i> and byte array <i>a2</i>.</p>
1116
 
<h3 class="fn"><a name="operator-2b-41"></a>const QByteArray operator+ ( char <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
 
1217
<h3 class="fn"><a name="operator-2b-43"></a>const QByteArray operator+ ( char <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
1117
1218
<p>This is an overloaded function.</p>
1118
1219
<p>Returns a byte array that is the result of concatenating character <i>a1</i> and byte array <i>a2</i>.</p>
1119
 
<h3 class="fn"><a name="operator-2b-11"></a>const QByteArray operator+ ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
 
1220
<h3 class="fn"><a name="operator-2b-17"></a>const QByteArray operator+ ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
1120
1221
<p>Returns a byte array that is the result of concatenating byte array <i>a1</i> and byte array <i>a2</i>.</p>
1121
1222
<p>See also <a href="qbytearray.html#operator-2b-eq">QByteArray::operator+=</a>().</p>
1122
 
<h3 class="fn"><a name="operator-lt-19"></a>bool operator&lt; ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
 
1223
<h3 class="fn"><a name="operator-lt-18"></a>bool operator&lt; ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
1123
1224
<p>This is an overloaded function.</p>
1124
1225
<p>Returns true if byte array <i>a1</i> is lexically less than byte array <i>a2</i>; otherwise returns false.</p>
1125
 
<h3 class="fn"><a name="operator-lt-20"></a>bool operator&lt; ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</h3>
 
1226
<h3 class="fn"><a name="operator-lt-19"></a>bool operator&lt; ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</h3>
1126
1227
<p>This is an overloaded function.</p>
1127
1228
<p>Returns true if byte array <i>a1</i> is lexically less than string <i>a2</i>; otherwise returns false.</p>
1128
 
<h3 class="fn"><a name="operator-lt-21"></a>bool operator&lt; ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
 
1229
<h3 class="fn"><a name="operator-lt-20"></a>bool operator&lt; ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
1129
1230
<p>This is an overloaded function.</p>
1130
1231
<p>Returns true if string <i>a1</i> is lexically less than byte array <i>a2</i>; otherwise returns false.</p>
1131
 
<h3 class="fn"><a name="operator-lt-lt-92"></a><a href="qdatastream.html">QDataStream</a> &amp; operator&lt;&lt; ( <a href="qdatastream.html">QDataStream</a> &amp; <i>out</i>, const QByteArray &amp; <i>ba</i> )</h3>
 
1232
<h3 class="fn"><a name="operator-lt-lt-141"></a><a href="qdatastream.html">QDataStream</a> &amp; operator&lt;&lt; ( <a href="qdatastream.html">QDataStream</a> &amp; <i>out</i>, const QByteArray &amp; <i>ba</i> )</h3>
1132
1233
<p>Writes byte array <i>ba</i> to the stream <i>out</i> and returns a reference to the stream.</p>
1133
1234
<p>See also <a href="datastreamformat.html">Format of the QDataStream operators</a>.</p>
1134
 
<h3 class="fn"><a name="operator-lt-eq-14"></a>bool operator&lt;= ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
 
1235
<h3 class="fn"><a name="operator-lt-eq-13"></a>bool operator&lt;= ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
1135
1236
<p>This is an overloaded function.</p>
1136
1237
<p>Returns true if byte array <i>a1</i> is lexically less than or equal to byte array <i>a2</i>; otherwise returns false.</p>
1137
 
<h3 class="fn"><a name="operator-lt-eq-15"></a>bool operator&lt;= ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</h3>
 
1238
<h3 class="fn"><a name="operator-lt-eq-14"></a>bool operator&lt;= ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</h3>
1138
1239
<p>This is an overloaded function.</p>
1139
1240
<p>Returns true if byte array <i>a1</i> is lexically less than or equal to string <i>a2</i>; otherwise returns false.</p>
1140
 
<h3 class="fn"><a name="operator-lt-eq-16"></a>bool operator&lt;= ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
 
1241
<h3 class="fn"><a name="operator-lt-eq-15"></a>bool operator&lt;= ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
1141
1242
<p>This is an overloaded function.</p>
1142
1243
<p>Returns true if string <i>a1</i> is lexically less than or equal to byte array <i>a2</i>; otherwise returns false.</p>
1143
 
<h3 class="fn"><a name="operator-eq-eq-74"></a>bool operator== ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
 
1244
<h3 class="fn"><a name="operator-eq-eq-82"></a>bool operator== ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
1144
1245
<p>This is an overloaded function.</p>
1145
1246
<p>Returns true if byte array <i>a1</i> is equal to byte array <i>a2</i>; otherwise returns false.</p>
1146
 
<h3 class="fn"><a name="operator-eq-eq-75"></a>bool operator== ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</h3>
 
1247
<h3 class="fn"><a name="operator-eq-eq-83"></a>bool operator== ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</h3>
1147
1248
<p>This is an overloaded function.</p>
1148
1249
<p>Returns true if byte array <i>a1</i> is equal to string <i>a2</i>; otherwise returns false.</p>
1149
 
<h3 class="fn"><a name="operator-eq-eq-76"></a>bool operator== ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
 
1250
<h3 class="fn"><a name="operator-eq-eq-84"></a>bool operator== ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
1150
1251
<p>This is an overloaded function.</p>
1151
1252
<p>Returns true if string <i>a1</i> is equal to byte array <i>a2</i>; otherwise returns false.</p>
1152
 
<h3 class="fn"><a name="operator-gt-14"></a>bool operator&gt; ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
 
1253
<h3 class="fn"><a name="operator-gt-13"></a>bool operator&gt; ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
1153
1254
<p>This is an overloaded function.</p>
1154
1255
<p>Returns true if byte array <i>a1</i> is lexically greater than byte array <i>a2</i>; otherwise returns false.</p>
1155
 
<h3 class="fn"><a name="operator-gt-15"></a>bool operator&gt; ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</h3>
 
1256
<h3 class="fn"><a name="operator-gt-14"></a>bool operator&gt; ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</h3>
1156
1257
<p>This is an overloaded function.</p>
1157
1258
<p>Returns true if byte array <i>a1</i> is lexically greater than string <i>a2</i>; otherwise returns false.</p>
1158
 
<h3 class="fn"><a name="operator-gt-16"></a>bool operator&gt; ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
 
1259
<h3 class="fn"><a name="operator-gt-15"></a>bool operator&gt; ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
1159
1260
<p>This is an overloaded function.</p>
1160
1261
<p>Returns true if string <i>a1</i> is lexically greater than byte array <i>a2</i>; otherwise returns false.</p>
1161
 
<h3 class="fn"><a name="operator-gt-eq-14"></a>bool operator&gt;= ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
 
1262
<h3 class="fn"><a name="operator-gt-eq-13"></a>bool operator&gt;= ( const QByteArray &amp; <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
1162
1263
<p>This is an overloaded function.</p>
1163
1264
<p>Returns true if byte array <i>a1</i> is lexically greater than or equal to byte array <i>a2</i>; otherwise returns false.</p>
1164
 
<h3 class="fn"><a name="operator-gt-eq-15"></a>bool operator&gt;= ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</h3>
 
1265
<h3 class="fn"><a name="operator-gt-eq-14"></a>bool operator&gt;= ( const QByteArray &amp; <i>a1</i>, const char * <i>a2</i> )</h3>
1165
1266
<p>This is an overloaded function.</p>
1166
1267
<p>Returns true if byte array <i>a1</i> is lexically greater than or equal to string <i>a2</i>; otherwise returns false.</p>
1167
 
<h3 class="fn"><a name="operator-gt-eq-16"></a>bool operator&gt;= ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
 
1268
<h3 class="fn"><a name="operator-gt-eq-15"></a>bool operator&gt;= ( const char * <i>a1</i>, const QByteArray &amp; <i>a2</i> )</h3>
1168
1269
<p>This is an overloaded function.</p>
1169
1270
<p>Returns true if string <i>a1</i> is lexically greater than or equal to byte array <i>a2</i>; otherwise returns false.</p>
1170
 
<h3 class="fn"><a name="operator-gt-gt-54"></a><a href="qdatastream.html">QDataStream</a> &amp; operator&gt;&gt; ( <a href="qdatastream.html">QDataStream</a> &amp; <i>in</i>, QByteArray &amp; <i>ba</i> )</h3>
 
1271
<h3 class="fn"><a name="operator-gt-gt-75"></a><a href="qdatastream.html">QDataStream</a> &amp; operator&gt;&gt; ( <a href="qdatastream.html">QDataStream</a> &amp; <i>in</i>, QByteArray &amp; <i>ba</i> )</h3>
1171
1272
<p>Reads a byte array into <i>ba</i> from the stream <i>in</i> and returns a reference to the stream.</p>
1172
1273
<p>See also <a href="datastreamformat.html">Format of the QDataStream operators</a>.</p>
1173
1274
<hr />
1174
1275
<h2>Macro Documentation</h2>
 
1276
<a name="//apple_ref/cpp/macro//QT_NO_CAST_FROM_BYTEARRAY" />
1175
1277
<h3 class="fn"><a name="QT_NO_CAST_FROM_BYTEARRAY"></a>QT_NO_CAST_FROM_BYTEARRAY</h3>
1176
1278
<p>Disables automatic conversions from <a href="qbytearray.html">QByteArray</a> to const char * or const void *.</p>
1177
1279
<p>See also <a href="qstring.html#QT_NO_CAST_TO_ASCII">QT_NO_CAST_TO_ASCII</a> and <a href="qstring.html#QT_NO_CAST_FROM_ASCII">QT_NO_CAST_FROM_ASCII</a>.</p>
1178
1280
<p /><address><hr /><div align="center">
1179
1281
<table width="100%" cellspacing="0" border="0"><tr class="address">
1180
 
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
1181
 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
1182
 
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
1183
 
</tr></table></div></address></body>
 
1282
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
1283
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
1284
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
1285
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>
1184
1286
</html>