Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > fc480f9d5aabed8eeaffe8ad3401a94c > files > 9700

openoffice.org-devel-doc-3.2.1-0.3mdv2010.2.i586.rpm

<html>
<head>
<title>class OUStringBuffer</title>
<link rel="stylesheet" type="text/css" href="../../cpp.css">
</head>
<body>
<div id="adc-cppref">

<a name="_top_"> </a><table class="navimain" border="0" cellpadding="1" cellspacing="0">
<tr align="center" valign="top">
<td class="navimain">&nbsp;<a href="../../index.html">Overview</a>&nbsp;</td>
<td class="navimain">&nbsp;<a href="index.html">Namespace</a>&nbsp;</td>
<td class="navimainself">&nbsp;Class&nbsp;</td>
<td class="navimain">&nbsp;<a href="../../index-files/index-1.html">Index</a>&nbsp;</td>
<td class="navimain">&nbsp;<a href="../../help.html">Help</a>&nbsp;</td>
</tr>
</table>
<table class="navisub" cellpadding="0" cellspacing="3">
<tr>
<td width="20%"><font size="-2">PUBLIC MEMBERS:</font></td>
<td>
&nbsp;<font size="-2">CLASSES</font>
|&nbsp;<font size="-2">STRUCTS</font>
|&nbsp;<font size="-2">UNIONS</font>
|&nbsp;<font size="-2">ENUMS</font>
|&nbsp;<font size="-2">TYPEDEFS</font>
|&nbsp;<a href="#publ_ops"><font size="-2"><b>METHODS</b></font></a>
|&nbsp;<font size="-2">STATIC METHODS</font>
|&nbsp;<font size="-2">DATA</font>
|&nbsp;<font size="-2">STATIC DATA</font></td>
</tr>
<tr>
<td width="20%"><font size="-2">PRIVATE MEMBERS:</font></td>
<td>
&nbsp;<font size="-2">CLASSES</font>
|&nbsp;<font size="-2">STRUCTS</font>
|&nbsp;<font size="-2">UNIONS</font>
|&nbsp;<font size="-2">ENUMS</font>
|&nbsp;<font size="-2">TYPEDEFS</font>
|&nbsp;<font size="-2">METHODS</font>
|&nbsp;<font size="-2">STATIC METHODS</font>
|&nbsp;<a href="#priv_vars"><font size="-2"><b>DATA</b></font></a>
|&nbsp;<font size="-2">STATIC DATA</font></td>
</tr>
</table>
<hr>
<a href="../../names/index.html" alt="Global Namespace in C++"><font size="+1"><b>::</b></font></a> <a href="index.html" alt="namespace"><font size="+1"><b>rtl</b></font></a><font size="+1"> :: </font><div class="title"><h2>class OUStringBuffer</h2>
</div><hr>
<dl>
<dt>Base Classes</dt>
<dd>None.</dd>
</dl>
<dl>
<dt>Known Derived Classes</dt>
<dd>None.</dd>
</dl>
<br>
<table class="flag-table" border="1" cellspacing="0">
<tr>
<td width="25%" class="flagname">virtual</td>
<td width="25%" class="flagname">abstract</td>
<td width="25%" class="flagname">interface</td>
<td width="25%" class="flagname">template</td>
</tr>
<tr>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
</tr>
</table>
<dl>
<dt>Description</dt>
<dd>A string buffer implements a mutable sequence of characters.
<p>
String buffers are safe for use by multiple threads. The methods
are synchronized where necessary so that all the operations on any
particular instance behave as if they occur in some serial order.
<p>
String buffers are used by the compiler to implement the binary
string concatenation operator <code>+</code>. For example, the code:
<p><blockquote><pre>
    x = "a" + 4 + "c"
</pre></blockquote><p>
is compiled to the equivalent of:
<p><blockquote><pre>
    x = new OUStringBuffer().append("a").append(4).append("c")
                          .toString()
</pre></blockquote><p>
The principal operations on a <code>OUStringBuffer</code> are the
<code>append</code> and <code>insert</code> methods, which are
overloaded so as to accept data of any type. Each effectively
converts a given datum to a string and then appends or inserts the
characters of that string to the string buffer. The
<code>append</code> method always adds these characters at the end
of the buffer; the <code>insert</code> method adds the characters at
a specified point.
<p>
For example, if <code>z</code> refers to a string buffer object
whose current contents are "<code>start</code>", then
the method call <code>z.append("le")</code> would cause the string
buffer to contain "<code>startle</code>", whereas
<code>z.insert(4, "le")</code> would alter the string buffer to
contain "<code>starlet</code>".
<p>
Every string buffer has a capacity. As long as the length of the
character sequence contained in the string buffer does not exceed
the capacity, it is not necessary to allocate a new internal
buffer array. If the internal buffer overflows, it is
automatically made larger.
</dd>
</dl>
<dl>
<dt>File</dt>
<dd>ustrbuf.hxx</dd>
</dl>
<hr>
<dl>
<dt class="subtitle"><a name="publ_"><h3>Public Members</h3>
</a></dt>
<dd><a name="publ_ops"> </a><table class="childlist" border="1" cellpadding="5" cellspacing="0" width="100%">
<tr class="subtitle">
<td colspan="2"><h4>Methods</h4>
</td>
</tr>
<tr>
<td> <br>
<a href="OUStringBuffer/o.html#OUStringBuffer-1137">OUStringBuffer</a>( );</td>
<td width="50%"> Constructs a string buffer with no characters in it and an
initial capacity of 16 characters.
</td>
</tr>
<tr>
<td> <br>
<a href="OUStringBuffer/o.html#OUStringBuffer-1138">OUStringBuffer</a>( const OUStringBuffer &amp; value );</td>
<td width="50%"> Allocates a new string buffer that contains the same sequence of
characters as the string buffer argument.

</td>
</tr>
<tr>
<td> <br>
<a href="OUStringBuffer/o.html#OUStringBuffer-1139">OUStringBuffer</a>( sal_Int32 length );</td>
<td width="50%"> Constructs a string buffer with no characters in it and an
initial capacity specified by the &lt;code&gt;length&lt;/code&gt; argument.

</td>
</tr>
<tr>
<td> <br>
<a href="OUStringBuffer/o.html#OUStringBuffer-1140">OUStringBuffer</a>( OUString value );</td>
<td width="50%"> Constructs a string buffer so that it represents the same
sequence of characters as the string argument.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#operator=-1141">operator=</a>( const OUStringBuffer &amp; value );</td>
<td width="50%"> Assign to this a copy of value.
</td>
</tr>
<tr>
<td> <br>
<a href="OUStringBuffer/o.html#~OUStringBuffer-1142">~OUStringBuffer</a>( );</td>
<td width="50%"> Release the string data.
</td>
</tr>
<tr>
<td>OUString <br>
<a href="OUStringBuffer/o.html#makeStringAndClear-1143">makeStringAndClear</a>( );</td>
<td width="50%"> Fill the string data in the new string and clear the buffer.

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OUStringBuffer/o.html#getLength-1144">getLength</a>( ) const;</td>
<td width="50%"> Returns the length (character count) of this string buffer.

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OUStringBuffer/o.html#getCapacity-1145">getCapacity</a>( ) const;</td>
<td width="50%"> Returns the current capacity of the String buffer.

</td>
</tr>
<tr>
<td>void <br>
<a href="OUStringBuffer/o.html#ensureCapacity-1146">ensureCapacity</a>( sal_Int32 minimumCapacity );</td>
<td width="50%"> Ensures that the capacity of the buffer is at least equal to the
specified minimum.

</td>
</tr>
<tr>
<td>void <br>
<a href="OUStringBuffer/o.html#setLength-1147">setLength</a>( sal_Int32 newLength );</td>
<td width="50%"> Sets the length of this String buffer.

</td>
</tr>
<tr>
<td>sal_Unicode <br>
<a href="OUStringBuffer/o.html#charAt-1148">charAt</a>( sal_Int32 index ) const;</td>
<td width="50%"> Returns the character at a specific index in this string buffer.

</td>
</tr>
<tr>
<td> <br>
<a href="OUStringBuffer/o.html#operator const sal_Unicode *-1149">operator const sal_Unicode *</a>( ) const;</td>
<td width="50%"> Return a null terminated unicode character array.
</td>
</tr>
<tr>
<td>const sal_Unicode * <br>
<a href="OUStringBuffer/o.html#getStr-1150">getStr</a>( ) const;</td>
<td width="50%"> Return a null terminated unicode character array.
</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#setCharAt-1151">setCharAt</a>( sal_Int32 index, sal_Unicode ch );</td>
<td width="50%"> The character at the specified index of this string buffer is set
to &lt;code&gt;ch&lt;/code&gt;.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#append-1152">append</a>( const OUString &amp; str );</td>
<td width="50%"> Appends the string to this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#append-1153">append</a>( const sal_Unicode * str );</td>
<td width="50%"> Appends the string representation of the &lt;code&gt;char&lt;/code&gt; array
argument to this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#append-1154">append</a>( const sal_Unicode * str, sal_Int32 len );</td>
<td width="50%"> Appends the string representation of the &lt;code&gt;char&lt;/code&gt; array
argument to this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#appendAscii-1155">appendAscii</a>( const sal_Char * str );</td>
<td width="50%"> Appends a 8-Bit ASCII character string to this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#appendAscii-1156">appendAscii</a>( const sal_Char * str, sal_Int32 len );</td>
<td width="50%"> Appends a 8-Bit ASCII character string to this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#append-1157">append</a>( sal_Bool b );</td>
<td width="50%"> Appends the string representation of the &lt;code&gt;sal_Bool&lt;/code&gt;
argument to the string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#append-1158">append</a>( sal_Unicode c );</td>
<td width="50%"> Appends the string representation of the &lt;code&gt;char&lt;/code&gt;
argument to this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#append-1159">append</a>( sal_Int32 i, sal_Int16 radix = 10 );</td>
<td width="50%"> Appends the string representation of the &lt;code&gt;sal_Int32&lt;/code&gt;
argument to this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#append-1160">append</a>( sal_Int64 l, sal_Int16 radix = 10 );</td>
<td width="50%"> Appends the string representation of the &lt;code&gt;long&lt;/code&gt;
argument to this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#append-1161">append</a>( float f );</td>
<td width="50%"> Appends the string representation of the &lt;code&gt;float&lt;/code&gt;
argument to this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#append-1162">append</a>( double d );</td>
<td width="50%"> Appends the string representation of the &lt;code&gt;double&lt;/code&gt;
argument to this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#appendUtf32-1163">appendUtf32</a>( sal_uInt32 c );</td>
<td width="50%"> Appends a single UTF-32 character to this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#insert-1164">insert</a>( sal_Int32 offset, const OUString &amp; str );</td>
<td width="50%"> Inserts the string into this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#insert-1165">insert</a>( sal_Int32 offset, const sal_Unicode * str );</td>
<td width="50%"> Inserts the string representation of the &lt;code&gt;char&lt;/code&gt; array
argument into this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#insert-1166">insert</a>( sal_Int32 offset, const sal_Unicode * str, sal_Int32 len );</td>
<td width="50%"> Inserts the string representation of the &lt;code&gt;char&lt;/code&gt; array
argument into this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#insert-1167">insert</a>( sal_Int32 offset, sal_Bool b );</td>
<td width="50%"> Inserts the string representation of the &lt;code&gt;sal_Bool&lt;/code&gt;
argument into this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#insert-1168">insert</a>( sal_Int32 offset, sal_Unicode c );</td>
<td width="50%"> Inserts the string representation of the &lt;code&gt;char&lt;/code&gt;
argument into this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#insert-1169">insert</a>( sal_Int32 offset, sal_Int32 i, sal_Int16 radix = 10 );</td>
<td width="50%"> Inserts the string representation of the second &lt;code&gt;sal_Int32&lt;/code&gt;
argument into this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#insert-1170">insert</a>( sal_Int32 offset, sal_Int64 l, sal_Int16 radix = 10 );</td>
<td width="50%"> Inserts the string representation of the &lt;code&gt;long&lt;/code&gt;
argument into this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer <br>
<a href="OUStringBuffer/o.html#insert-1171">insert</a>( sal_Int32 offset, float f );</td>
<td width="50%"> Inserts the string representation of the &lt;code&gt;float&lt;/code&gt;
argument into this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#insert-1172">insert</a>( sal_Int32 offset, double d );</td>
<td width="50%"> Inserts the string representation of the &lt;code&gt;double&lt;/code&gt;
argument into this string buffer.

</td>
</tr>
<tr>
<td>OUStringBuffer &amp; <br>
<a href="OUStringBuffer/o.html#insertUtf32-1173">insertUtf32</a>( sal_Int32 offset, sal_uInt32 c );</td>
<td width="50%"> Inserts a single UTF-32 character into this string buffer.

</td>
</tr>
<tr>
<td>void <br>
<a href="OUStringBuffer/o.html#accessInternals-1174">accessInternals</a>( rtl_uString * * * pInternalData, sal_Int32 * * pInternalCapacity );</td>
<td width="50%"> Allows access to the internal data of this OUStringBuffer, for effective
manipulation.

</td>
</tr>
</table>
<hr>
</dd>
</dl>
<dl>
<dt class="subtitle"><a name="priv_"><h3>Private Members</h3>
</a></dt>
<dd><a name="priv_vars"> </a><table class="childlist" border="1" cellpadding="5" cellspacing="0" width="100%">
<tr class="subtitle">
<td colspan="2"><h4>Data</h4>
</td>
</tr>
<tr bgcolor="white">
<td><a href="../t-rtl_uString.html">rtl_uString</a> * <a href="OUStringBuffer/d.html#pData"><strong>pData;</strong></a></td>
<td>A pointer to the data structur which contains the data.
</td>
</tr>
<tr bgcolor="white">
<td><a href="../t-sal_Int32.html">sal_Int32</a> <a href="OUStringBuffer/d.html#nCapacity"><strong>nCapacity;</strong></a></td>
<td>The len of the pData-&gt;buffer.
</td>
</tr>
</table>
<hr>
</dd>
</dl>
<a href="#_top_" class="objchapter">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright &copy; 2011, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.</p>

</div> <!-- id="adc-cppref" -->
</body>

</html>