Sophie

Sophie

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

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

<html>
<head>
<title>class OUString</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 OUString</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 Unicode
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>ustring.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="OUString/o.html#OUString-1181">OUString</a>( ) throw( );</td>
<td width="50%"> New string containing no characters.
</td>
</tr>
<tr>
<td> <br>
<a href="OUString/o.html#OUString-1182">OUString</a>( const OUString &amp; str ) throw( );</td>
<td width="50%"> New string from OUString.

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

</td>
</tr>
<tr>
<td> <br>
<a href="OUString/o.html#OUString-1184">OUString</a>( rtl_uString * str, __sal_NoAcquire  ) throw( );</td>
<td width="50%"> New OUString from OUString data without acquiring it.  Takeover of ownership.

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

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

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

</td>
</tr>
<tr>
<td> <br>
<a href="OUString/o.html#OUString-1188">OUString</a>( const sal_Char * value, sal_Int32 length, rtl_TextEncoding encoding, sal_uInt32 convertFlags = OSTRING_TO_OUSTRING_CVTFLAGS );</td>
<td width="50%"> New string from a 8-Bit character buffer array.

</td>
</tr>
<tr>
<td>explicit  <br>
<a href="OUString/o.html#OUString-1189">OUString</a>( const sal_uInt32 * codePoints, sal_Int32 codePointCount );</td>
<td width="50%"> Create a new string from an array of Unicode code points.

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

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

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

</td>
</tr>
<tr>
<td> <br>
<a href="OUString/o.html#operator const sal_Unicode *-1195">operator const sal_Unicode *</a>( ) const throw( );</td>
<td width="50%"> Returns a pointer to the Unicode character buffer from this string.

</td>
</tr>
<tr>
<td>const sal_Unicode * <br>
<a href="OUString/o.html#getStr-1196">getStr</a>( ) const throw( );</td>
<td width="50%"> Returns a pointer to the Unicode character buffer from this string.

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

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OUString/o.html#compareTo-1198">compareTo</a>( const OUString &amp; str, 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="OUString/o.html#reverseCompareTo-1199">reverseCompareTo</a>( const OUString &amp; str ) const throw( );</td>
<td width="50%"> Compares two strings in reverse order.

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

</td>
</tr>
<tr>
<td>sal_Bool <br>
<a href="OUString/o.html#equalsIgnoreAsciiCase-1201">equalsIgnoreAsciiCase</a>( const OUString &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="OUString/o.html#match-1202">match</a>( const OUString &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="OUString/o.html#matchIgnoreAsciiCase-1203">matchIgnoreAsciiCase</a>( const OUString &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="OUString/o.html#compareToAscii-1204">compareToAscii</a>( const sal_Char * asciiStr ) const throw( );</td>
<td width="50%"> Compares two strings.

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OUString/o.html#compareToAscii-1205">compareToAscii</a>( const sal_Char * asciiStr, 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="OUString/o.html#reverseCompareToAsciiL-1206">reverseCompareToAsciiL</a>( const sal_Char * asciiStr, sal_Int32 asciiStrLength ) const throw( );</td>
<td width="50%"> Compares two strings in reverse order.

</td>
</tr>
<tr>
<td>sal_Bool <br>
<a href="OUString/o.html#equalsAscii-1207">equalsAscii</a>( const sal_Char * asciiStr ) const throw( );</td>
<td width="50%"> Perform a comparison of two strings.

</td>
</tr>
<tr>
<td>sal_Bool <br>
<a href="OUString/o.html#equalsAsciiL-1208">equalsAsciiL</a>( const sal_Char * asciiStr, sal_Int32 asciiStrLength ) const throw( );</td>
<td width="50%"> Perform a comparison of two strings.

</td>
</tr>
<tr>
<td>sal_Bool <br>
<a href="OUString/o.html#equalsIgnoreAsciiCaseAscii-1209">equalsIgnoreAsciiCaseAscii</a>( const sal_Char * asciiStr ) const throw( );</td>
<td width="50%"> Perform a ASCII lowercase comparison of two strings.

</td>
</tr>
<tr>
<td>sal_Bool <br>
<a href="OUString/o.html#equalsIgnoreAsciiCaseAsciiL-1210">equalsIgnoreAsciiCaseAsciiL</a>( const sal_Char * asciiStr, sal_Int32 asciiStrLength ) const throw( );</td>
<td width="50%"> Perform a ASCII lowercase comparison of two strings.

</td>
</tr>
<tr>
<td>sal_Bool <br>
<a href="OUString/o.html#matchAsciiL-1211">matchAsciiL</a>( const sal_Char * asciiStr, sal_Int32 asciiStrLength, 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="OUString/o.html#matchIgnoreAsciiCaseAsciiL-1212">matchIgnoreAsciiCaseAsciiL</a>( const sal_Char * asciiStr, sal_Int32 asciiStrLength, 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>bool <br>
<a href="OUString/o.html#endsWithAsciiL-1213">endsWithAsciiL</a>( const char * asciiStr, sal_Int32 asciiStrLength ) const;</td>
<td width="50%"> Check whether this string ends with a given ASCII string.

</td>
</tr>
<tr>
<td>bool <br>
<a href="OUString/o.html#endsWithIgnoreAsciiCaseAsciiL-1214">endsWithIgnoreAsciiCaseAsciiL</a>( const char * asciiStr, sal_Int32 asciiStrLength ) const;</td>
<td width="50%"> Check whether this string ends with a given ASCII string, ignoring the
case of ASCII letters.

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

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OUString/o.html#indexOf-1216">indexOf</a>( sal_Unicode 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="OUString/o.html#lastIndexOf-1217">lastIndexOf</a>( sal_Unicode 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="OUString/o.html#lastIndexOf-1218">lastIndexOf</a>( sal_Unicode ch, sal_Int32 fromIndex ) const throw( );</td>
<td width="50%"> </td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OUString/o.html#indexOf-1219">indexOf</a>( const OUString &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="OUString/o.html#indexOfAsciiL-1220">indexOfAsciiL</a>( const char * str, sal_Int32 len, sal_Int32 fromIndex = 0 ) const throw( );</td>
<td width="50%"> Returns the index within this string of the first occurrence of the
specified ASCII substring, starting at the specified index.

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OUString/o.html#lastIndexOf-1221">lastIndexOf</a>( const OUString &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="OUString/o.html#lastIndexOf-1222">lastIndexOf</a>( const OUString &amp; str, sal_Int32 fromIndex ) const throw( );</td>
<td width="50%"> </td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OUString/o.html#lastIndexOfAsciiL-1223">lastIndexOfAsciiL</a>( const char * str, sal_Int32 len ) const throw( );</td>
<td width="50%"> Returns the index within this string of the last occurrence of the
specified ASCII substring.

</td>
</tr>
<tr>
<td>OUString <br>
<a href="OUString/o.html#copy-1224">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>OUString <br>
<a href="OUString/o.html#copy-1225">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>OUString <br>
<a href="OUString/o.html#concat-1226">concat</a>( const OUString &amp; str ) const throw( );</td>
<td width="50%"> Concatenates the specified string to the end of this string.

</td>
</tr>
<tr>
<td>OUString <br>
<a href="OUString/o.html#replaceAt-1227">replaceAt</a>( sal_Int32 index, sal_Int32 count, const OUString &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>OUString <br>
<a href="OUString/o.html#replace-1228">replace</a>( sal_Unicode oldChar, sal_Unicode 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>OUString <br>
<a href="OUString/o.html#toAsciiLowerCase-1229">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>OUString <br>
<a href="OUString/o.html#toAsciiUpperCase-1230">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>OUString <br>
<a href="OUString/o.html#trim-1231">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>OUString <br>
<a href="OUString/o.html#getToken-1232">getToken</a>( sal_Int32 token, sal_Unicode 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="OUString/o.html#toBoolean-1233">toBoolean</a>( ) const throw( );</td>
<td width="50%"> Returns the Boolean value from this string.

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

</td>
</tr>
<tr>
<td>sal_Int32 <br>
<a href="OUString/o.html#toInt32-1235">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="OUString/o.html#toInt64-1236">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="OUString/o.html#toFloat-1237">toFloat</a>( ) const throw( );</td>
<td width="50%"> Returns the float value from this string.

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

</td>
</tr>
<tr>
<td>OUString <br>
<a href="OUString/o.html#intern-1239">intern</a>( ) const;</td>
<td width="50%"> Return a canonical representation for a string.

</td>
</tr>
<tr>
<td>bool <br>
<a href="OUString/o.html#convertToString-1241">convertToString</a>( OString * pTarget, rtl_TextEncoding nEncoding, sal_uInt32 nFlags ) const;</td>
<td width="50%"> Converts to an OString, signalling failure.

</td>
</tr>
<tr>
<td>sal_uInt32 <br>
<a href="OUString/o.html#iterateCodePoints-1242">iterateCodePoints</a>( sal_Int32 * indexUtf16, sal_Int32 incrementCodePoints = 1 ) const;</td>
<td width="50%"> Iterate through this string based on code points instead of UTF-16 code
units.

</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 const OUString &amp; <br>
<a href="OUString/o.html#unacquired-1191">unacquired</a>( rtl_uString * const * ppHandle );</td>
<td width="50%"> </td>
</tr>
<tr>
<td>static OUString <br>
<a href="OUString/o.html#intern-1240">intern</a>( const sal_Char * value, sal_Int32 length, rtl_TextEncoding encoding, sal_uInt32 convertFlags = OSTRING_TO_OUSTRING_CVTFLAGS, sal_uInt32 * pInfo = NULL );</td>
<td width="50%"> Return a canonical representation for a converted string.

</td>
</tr>
<tr>
<td>static OUString <br>
<a href="OUString/o.html#valueOf-1243">valueOf</a>( sal_Bool b ) throw( );</td>
<td width="50%"> Returns the string representation of the sal_Bool argument.

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

</td>
</tr>
<tr>
<td>static OUString <br>
<a href="OUString/o.html#valueOf-1245">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 OUString <br>
<a href="OUString/o.html#valueOf-1246">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 OUString <br>
<a href="OUString/o.html#valueOf-1247">valueOf</a>( float f ) throw( );</td>
<td width="50%"> Returns the string representation of the float argument.

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

</td>
</tr>
<tr>
<td>static OUString <br>
<a href="OUString/o.html#createFromAscii-1249">createFromAscii</a>( const sal_Char * value ) throw( );</td>
<td width="50%"> Returns a OUString copied without conversion from an ASCII
character string.

</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>