Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-testing > by-pkgid > 2c50825dd66d0497b96a67f7fab2ee84 > files > 9336

openoffice.org64-devel-doc-2.4.1.10-1mdv2008.1.x86_64.rpm

<html>
<head>
<title>class OString</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;<a href="#publ_static_ops"><font size="-2"><b>STATIC METHODS</b></font></a>
|&nbsp;<font size="-2">DATA</font>
|&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 OString</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>This String class provide base functionality for C++ like 8-Bit
character array handling. The advantage of this class is, that it
handle all the memory managament for you - and it do it
more efficient. If you assign a string to another string, the
data of both strings are shared (without any copy operation or
memory allocation) as long as you do not change the string. This class
stores also the length of the string, so that many operations are
faster as the C-str-functions.

This class provide only readonly string handling. So you could create
a string and you could only query the content from this string.
It provide also functionality to change the string, but this results
in every case in a new string instance (in the most cases with an
memory allocation). You don't have functionality to change the
content of the string. If you want change the string content, than
you should us the OStringBuffer class, which provide these
functionality and avoid to much memory allocation.

The design of this class is similar to the string classes in Java
and so more people should have fewer understanding problems when they
use this class.
</dd>
</dl>
<dl>
<dt>File</dt>
<dd>string.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="OString/o.html#OString-1126">OString</a>( ) throw( );</td>
<td width="50%"> New string containing no characters.
</td>
</tr>
<tr>
<td> <br>
<a href="OString/o.html#OString-1127">OString</a>( const OString &amp; str ) throw( );</td>
<td width="50%"> New string from OString.

</td>
</tr>
<tr>
<td> <br>
<a href="OString/o.html#OString-1128">OString</a>( rtl_String * str ) throw( );</td>
<td width="50%"> New string from OString data.

</td>
</tr>
<tr>
<td>explicit  <br>
<a href="OString/o.html#OString-1129">OString</a>( sal_Char value ) throw( );</td>
<td width="50%"> New string from a single character.

</td>
</tr>
<tr>
<td> <br>
<a href="OString/o.html#OString-1130">OString</a>( const sal_Char * value ) throw( );</td>
<td width="50%"> New string from a character buffer array.

</td>
</tr>
<tr>
<td> <br>
<a href="OString/o.html#OString-1131">OString</a>( const sal_Char * value, sal_Int32 length ) throw( );</td>
<td width="50%"> New string from a character buffer array.

</td>
</tr>
<tr>
<td> <br>
<a href="OString/o.html#OString-1132">OString</a>( const sal_Unicode * value, sal_Int32 length, rtl_TextEncoding encoding, sal_uInt32 convertFlags = OUSTRING_TO_OSTRING_CVTFLAGS );</td>
<td width="50%"> New string from a Unicode character buffer array.

</td>
</tr>
<tr>
<td> <br>
<a href="OString/o.html#~OString-1133">~OString</a>( ) throw( );</td>
<td width="50%"> Release the string data.
</td>
</tr>
<tr>
<td>OString &amp; <br>
<a href="OString/o.html#operator=-1134">operator=</a>( const OString &amp; str ) throw( );</td>
<td width="50%"> Assign a new string.

</td>
</tr>
<tr>
<td>OString &amp; <br>
<a href="OString/o.html#operator+=-1135">operator+=</a>( const OString &amp; str ) throw( );</td>
<td width="50%"> Append a string to this string.

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OString/o.html#getLength-1136">getLength</a>( ) const throw( );</td>
<td width="50%"> Returns the length of this string.

</td>
</tr>
<tr>
<td> <br>
<a href="OString/o.html#operator const sal_Char *-1137">operator const sal_Char *</a>( ) const throw( );</td>
<td width="50%"> Returns a pointer to the characters of this string.

</td>
</tr>
<tr>
<td>const sal_Char * <br>
<a href="OString/o.html#getStr-1138">getStr</a>( ) const throw( );</td>
<td width="50%"> Returns a pointer to the characters of this string.

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OString/o.html#compareTo-1139">compareTo</a>( const OString &amp; str ) const throw( );</td>
<td width="50%"> Compares two strings.

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OString/o.html#compareTo-1140">compareTo</a>( const OString &amp; rObj, sal_Int32 maxLength ) const throw( );</td>
<td width="50%"> Compares two strings with an maximum count of characters.

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OString/o.html#reverseCompareTo-1141">reverseCompareTo</a>( const OString &amp; str ) const throw( );</td>
<td width="50%"> Compares two strings in reverse order.

</td>
</tr>
<tr>
<td>sal_Bool <br>
<a href="OString/o.html#equals-1142">equals</a>( const OString &amp; str ) const throw( );</td>
<td width="50%"> Perform a comparison of two strings.

</td>
</tr>
<tr>
<td>sal_Bool <br>
<a href="OString/o.html#equalsIgnoreAsciiCase-1143">equalsIgnoreAsciiCase</a>( const OString &amp; str ) const throw( );</td>
<td width="50%"> Perform a ASCII lowercase comparison of two strings.

</td>
</tr>
<tr>
<td>sal_Bool <br>
<a href="OString/o.html#match-1144">match</a>( const OString &amp; str, sal_Int32 fromIndex = 0 ) const throw( );</td>
<td width="50%"> Match against a substring appearing in this string.

</td>
</tr>
<tr>
<td>sal_Bool <br>
<a href="OString/o.html#matchIgnoreAsciiCase-1145">matchIgnoreAsciiCase</a>( const OString &amp; str, sal_Int32 fromIndex = 0 ) const throw( );</td>
<td width="50%"> Match against a substring appearing in this string, ignoring the case of
ASCII letters.

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OString/o.html#hashCode-1146">hashCode</a>( ) const throw( );</td>
<td width="50%"> Returns a hashcode for this string.

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OString/o.html#indexOf-1147">indexOf</a>( sal_Char ch, sal_Int32 fromIndex = 0 ) const throw( );</td>
<td width="50%"> Returns the index within this string of the first occurrence of the
specified character, starting the search at the specified index.

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OString/o.html#lastIndexOf-1148">lastIndexOf</a>( sal_Char ch ) const throw( );</td>
<td width="50%"> Returns the index within this string of the last occurrence of the
specified character, searching backward starting at the end.

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OString/o.html#lastIndexOf-1149">lastIndexOf</a>( sal_Char ch, sal_Int32 fromIndex ) const throw( );</td>
<td width="50%"> </td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OString/o.html#indexOf-1150">indexOf</a>( const OString &amp; str, sal_Int32 fromIndex = 0 ) const throw( );</td>
<td width="50%"> Returns the index within this string of the first occurrence of the
specified substring, starting at the specified index.

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OString/o.html#lastIndexOf-1151">lastIndexOf</a>( const OString &amp; str ) const throw( );</td>
<td width="50%"> Returns the index within this string of the last occurrence of
the specified substring, searching backward starting at the end.

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OString/o.html#lastIndexOf-1152">lastIndexOf</a>( const OString &amp; str, sal_Int32 fromIndex ) const throw( );</td>
<td width="50%"> </td>
</tr>
<tr>
<td>OString <br>
<a href="OString/o.html#copy-1153">copy</a>( sal_Int32 beginIndex ) const throw( );</td>
<td width="50%"> Returns a new string that is a substring of this string.

</td>
</tr>
<tr>
<td>OString <br>
<a href="OString/o.html#copy-1154">copy</a>( sal_Int32 beginIndex, sal_Int32 count ) const throw( );</td>
<td width="50%"> Returns a new string that is a substring of this string.

</td>
</tr>
<tr>
<td>OString <br>
<a href="OString/o.html#concat-1155">concat</a>( const OString &amp; str ) const throw( );</td>
<td width="50%"> Concatenates the specified string to the end of this string.

</td>
</tr>
<tr>
<td>OString <br>
<a href="OString/o.html#replaceAt-1156">replaceAt</a>( sal_Int32 index, sal_Int32 count, const OString &amp; newStr ) const throw( );</td>
<td width="50%"> Returns a new string resulting from replacing n = count characters
from position index in this string with newStr.

</td>
</tr>
<tr>
<td>OString <br>
<a href="OString/o.html#replace-1157">replace</a>( sal_Char oldChar, sal_Char newChar ) const throw( );</td>
<td width="50%"> Returns a new string resulting from replacing all occurrences of
oldChar in this string with newChar.

</td>
</tr>
<tr>
<td>OString <br>
<a href="OString/o.html#toAsciiLowerCase-1158">toAsciiLowerCase</a>( ) const throw( );</td>
<td width="50%"> Converts from this string all ASCII uppercase characters (65-90)
to ASCII lowercase characters (97-122).

</td>
</tr>
<tr>
<td>OString <br>
<a href="OString/o.html#toAsciiUpperCase-1159">toAsciiUpperCase</a>( ) const throw( );</td>
<td width="50%"> Converts from this string all ASCII lowercase characters (97-122)
to ASCII uppercase characters (65-90).

</td>
</tr>
<tr>
<td>OString <br>
<a href="OString/o.html#trim-1160">trim</a>( ) const throw( );</td>
<td width="50%"> Returns a new string resulting from removing white space from both ends
of the string.

</td>
</tr>
<tr>
<td>OString <br>
<a href="OString/o.html#getToken-1161">getToken</a>( sal_Int32 token, sal_Char cTok, sal_Int32 &amp; index ) const throw( );</td>
<td width="50%"> Returns a token in the string.

</td>
</tr>
<tr>
<td>sal_Bool <br>
<a href="OString/o.html#toBoolean-1162">toBoolean</a>( ) const throw( );</td>
<td width="50%"> Returns the Boolean value from this string.

</td>
</tr>
<tr>
<td>sal_Char <br>
<a href="OString/o.html#toChar-1163">toChar</a>( ) const throw( );</td>
<td width="50%"> Returns the first character from this string.

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OString/o.html#toInt32-1164">toInt32</a>( sal_Int16 radix = 10 ) const throw( );</td>
<td width="50%"> Returns the int32 value from this string.

</td>
</tr>
<tr>
<td>sal_Int64 <br>
<a href="OString/o.html#toInt64-1165">toInt64</a>( sal_Int16 radix = 10 ) const throw( );</td>
<td width="50%"> Returns the int64 value from this string.

</td>
</tr>
<tr>
<td>float <br>
<a href="OString/o.html#toFloat-1166">toFloat</a>( ) const throw( );</td>
<td width="50%"> Returns the float value from this string.

</td>
</tr>
<tr>
<td>double <br>
<a href="OString/o.html#toDouble-1167">toDouble</a>( ) const throw( );</td>
<td width="50%"> Returns the double value from this string.

</td>
</tr>
</table>
<hr>
<a name="publ_static_ops"> </a><table class="childlist" border="1" cellpadding="5" cellspacing="0" width="100%">
<tr class="subtitle">
<td colspan="2"><h4>Static Methods</h4>
</td>
</tr>
<tr>
<td>static OString <br>
<a href="OString/o.html#valueOf-1168">valueOf</a>( sal_Bool b ) throw( );</td>
<td width="50%"> Returns the string representation of the sal_Bool argument.

</td>
</tr>
<tr>
<td>static OString <br>
<a href="OString/o.html#valueOf-1169">valueOf</a>( sal_Char c ) throw( );</td>
<td width="50%"> Returns the string representation of the char argument.

</td>
</tr>
<tr>
<td>static OString <br>
<a href="OString/o.html#valueOf-1170">valueOf</a>( sal_Int32 i, sal_Int16 radix = 10 ) throw( );</td>
<td width="50%"> Returns the string representation of the int argument.

</td>
</tr>
<tr>
<td>static OString <br>
<a href="OString/o.html#valueOf-1171">valueOf</a>( sal_Int64 ll, sal_Int16 radix = 10 ) throw( );</td>
<td width="50%"> Returns the string representation of the long argument.

</td>
</tr>
<tr>
<td>static OString <br>
<a href="OString/o.html#valueOf-1172">valueOf</a>( float f ) throw( );</td>
<td width="50%"> Returns the string representation of the float argument.

</td>
</tr>
<tr>
<td>static OString <br>
<a href="OString/o.html#valueOf-1173">valueOf</a>( double d ) throw( );</td>
<td width="50%"> Returns the string representation of the double argument.

</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; 2008 Sun Microsystems, Inc.</p>

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

</html>