Methods of Class OUString
- OUString
- OUString() throw();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- New string containing no characters.
- OUString
- OUString(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- New string from OUString.
- Parameters
-
- OUString
- OUString(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- New string from OUString data.
- Parameters
-
- OUString
- OUString(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- New OUString from OUString data without acquiring it. Takeover of ownership.
- Parameters
str |
OUString data
|
dummy |
SAL_NO_ACQUIRE to distinguish from other ctors
|
- OUString
- explicit OUString(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- New string from a single Unicode character.
- Parameters
value |
a Unicode character.
|
- OUString
- OUString(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- New string from a Unicode character buffer array.
- Parameters
value |
a NULL-terminated Unicode character array.
|
- OUString
- OUString(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- New string from a Uniocde character buffer array.
- Parameters
value |
a Unicode character array.
|
length |
the number of character which should be copied.
The character array length must be greater or
equal than this value.
|
- OUString
- OUString(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- New string from a 8-Bit character buffer array.
- Parameters
value |
a 8-Bit character array.
|
length |
the number of character which should be converted.
The 8-Bit character array length must be
greater or equal than this value.
|
encoding |
the text encoding from which the 8-Bit character
sequence should be converted.
|
convertFlags |
flags which controls the conversion.
see RTL_TEXTTOUNICODE_FLAGS_...
|
- OUString
- explicit OUString(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Create a new string from an array of Unicode code points.
- Parameters
codePoints |
an array of at least codePointCount code points, which each must be in
the range from 0 to 0x10FFFF, inclusive. May be null if codePointCount
is zero.
|
codePointCount |
the non-negative number of code points.
|
- Since
- UDK 3.2.7
- ~OUString
- ~OUString() throw();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Release the string data.
- operator=
- OUString & operator=(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Assign a new string.
- Parameters
-
- operator+=
- OUString & operator+=(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Append a string to this string.
- Parameters
-
- getLength
- sal_Int32 getLength() throw();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns the length of this string.
- Description
- The length is equal to the number of Unicode characters in this string.
- Return
- the length of the sequence of characters represented by this
object.
- operator const sal_Unicode *
- operator const sal_Unicode *() throw();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns a pointer to the Unicode character buffer from this string.
- Description
- It isn't necessarily NULL terminated.
- Return
- a pointer to the Unicode characters buffer from this object.
- getStr
- const sal_Unicode * getStr() throw();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns a pointer to the Unicode character buffer from this string.
- Description
- It isn't necessarily NULL terminated.
- Return
- a pointer to the Unicode characters buffer from this object.
- compareTo
- sal_Int32 compareTo(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Compares two strings.
- Description
- The comparison is based on the numeric value of each character in
the strings and return a value indicating their relationship.
This function can't be used for language specific sorting.
- Parameters
str |
the object to be compared.
|
- Return
- 0 - if both strings are equal
< 0 - if this string is less than the string argument
> 0 - if this string is greater than the string argument
- compareTo
- sal_Int32 compareTo(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Compares two strings with an maximum count of characters.
- Description
- The comparison is based on the numeric value of each character in
the strings and return a value indicating their relationship.
This function can't be used for language specific sorting.
- Parameters
str |
the object to be compared.
|
maxLength |
the maximum count of characters to be compared.
|
- Return
- 0 - if both strings are equal
< 0 - if this string is less than the string argument
> 0 - if this string is greater than the string argument
- reverseCompareTo
- sal_Int32 reverseCompareTo(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Compares two strings in reverse order.
- Description
- The comparison is based on the numeric value of each character in
the strings and return a value indicating their relationship.
This function can't be used for language specific sorting.
- Parameters
str |
the object to be compared.
|
- Return
- 0 - if both strings are equal
< 0 - if this string is less than the string argument
> 0 - if this string is greater than the string argument
- equals
- sal_Bool equals(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Perform a comparison of two strings.
- Description
- The result is true if and only if second string
represents the same sequence of characters as the first string.
This function can't be used for language specific comparison.
- Parameters
str |
the object to be compared.
|
- Return
- sal_True if the strings are equal;
sal_False, otherwise.
- equalsIgnoreAsciiCase
- sal_Bool equalsIgnoreAsciiCase(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Perform a ASCII lowercase comparison of two strings.
- Description
- The result is true if and only if second string
represents the same sequence of characters as the first string,
ignoring the case.
Character values between 65 and 90 (ASCII A-Z) are interpreted as
values between 97 and 122 (ASCII a-z).
This function can't be used for language specific comparison.
- Parameters
str |
the object to be compared.
|
- Return
- sal_True if the strings are equal;
sal_False, otherwise.
- match
- sal_Bool match(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Match against a substring appearing in this string.
- Description
- The result is true if and only if the second string appears as a substring
of this string, at the given position.
This function can't be used for language specific comparison.
- Parameters
str |
the object (substring) to be compared.
|
fromIndex |
the index to start the comparion from.
The index must be greater or equal than 0
and less or equal as the string length.
|
- Return
- sal_True if str match with the characters in the string
at the given position;
sal_False, otherwise.
- matchIgnoreAsciiCase
- sal_Bool matchIgnoreAsciiCase(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Match against a substring appearing in this string, ignoring the case of
ASCII letters.
- Description
- The result is true if and only if the second string appears as a substring
of this string, at the given position.
Character values between 65 and 90 (ASCII A-Z) are interpreted as
values between 97 and 122 (ASCII a-z).
This function can't be used for language specific comparison.
- Parameters
str |
the object (substring) to be compared.
|
fromIndex |
the index to start the comparion from.
The index must be greater or equal than 0
and less or equal as the string length.
|
- Return
- sal_True if str match with the characters in the string
at the given position;
sal_False, otherwise.
- compareToAscii
- sal_Int32 compareToAscii(
const sal_Char * |
asciiStr ) const throw(); |
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Compares two strings.
- Description
- The comparison is based on the numeric value of each character in
the strings and return a value indicating their relationship.
Since this method is optimized for performance, the ASCII character
values are not converted in any way. The caller has to make sure that
all ASCII characters are in the allowed range between 0 and
127. The ASCII string must be NULL-terminated.
This function can't be used for language specific sorting.
- Parameters
asciiStr |
the 8-Bit ASCII character string to be compared.
|
- Return
- 0 - if both strings are equal
< 0 - if this string is less than the string argument
> 0 - if this string is greater than the string argument
- compareToAscii
- sal_Int32 compareToAscii(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Compares two strings with an maximum count of characters.
- Description
- The comparison is based on the numeric value of each character in
the strings and return a value indicating their relationship.
Since this method is optimized for performance, the ASCII character
values are not converted in any way. The caller has to make sure that
all ASCII characters are in the allowed range between 0 and
127. The ASCII string must be NULL-terminated.
This function can't be used for language specific sorting.
- Parameters
asciiStr |
the 8-Bit ASCII character string to be compared.
|
maxLength |
the maximum count of characters to be compared.
|
- Return
- 0 - if both strings are equal
< 0 - if this string is less than the string argument
> 0 - if this string is greater than the string argument
- reverseCompareToAsciiL
- sal_Int32 reverseCompareToAsciiL(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Compares two strings in reverse order.
- Description
- This could be useful, if normally both strings start with the same
content. The comparison is based on the numeric value of each character
in the strings and return a value indicating their relationship.
Since this method is optimized for performance, the ASCII character
values are not converted in any way. The caller has to make sure that
all ASCII characters are in the allowed range between 0 and
127. The ASCII string must be NULL-terminated and must be greater or
equal as asciiStrLength.
This function can't be used for language specific sorting.
- Parameters
asciiStr |
the 8-Bit ASCII character string to be compared.
|
asciiStrLength |
the length of the ascii string
|
- Return
- 0 - if both strings are equal
< 0 - if this string is less than the string argument
> 0 - if this string is greater than the string argument
- equalsAscii
- sal_Bool equalsAscii(
const sal_Char * |
asciiStr ) const throw(); |
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Perform a comparison of two strings.
- Description
- The result is true if and only if second string
represents the same sequence of characters as the first string.
Since this method is optimized for performance, the ASCII character
values are not converted in any way. The caller has to make sure that
all ASCII characters are in the allowed range between 0 and
127. The ASCII string must be NULL-terminated.
This function can't be used for language specific comparison.
- Parameters
asciiStr |
the 8-Bit ASCII character string to be compared.
|
- Return
- sal_True if the strings are equal;
sal_False, otherwise.
- equalsAsciiL
- sal_Bool equalsAsciiL(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Perform a comparison of two strings.
- Description
- The result is true if and only if second string
represents the same sequence of characters as the first string.
Since this method is optimized for performance, the ASCII character
values are not converted in any way. The caller has to make sure that
all ASCII characters are in the allowed range between 0 and
127. The ASCII string must be NULL-terminated and must be greater or
equal as asciiStrLength.
This function can't be used for language specific comparison.
- Parameters
asciiStr |
the 8-Bit ASCII character string to be compared.
|
asciiStrLength |
the length of the ascii string
|
- Return
- sal_True if the strings are equal;
sal_False, otherwise.
- equalsIgnoreAsciiCaseAscii
- sal_Bool equalsIgnoreAsciiCaseAscii(
const sal_Char * |
asciiStr ) const throw(); |
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Perform a ASCII lowercase comparison of two strings.
- Description
- The result is true if and only if second string
represents the same sequence of characters as the first string,
ignoring the case.
Character values between 65 and 90 (ASCII A-Z) are interpreted as
values between 97 and 122 (ASCII a-z).
Since this method is optimized for performance, the ASCII character
values are not converted in any way. The caller has to make sure that
all ASCII characters are in the allowed range between 0 and
127. The ASCII string must be NULL-terminated.
This function can't be used for language specific comparison.
- Parameters
asciiStr |
the 8-Bit ASCII character string to be compared.
|
- Return
- sal_True if the strings are equal;
sal_False, otherwise.
- equalsIgnoreAsciiCaseAsciiL
- sal_Bool equalsIgnoreAsciiCaseAsciiL(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Perform a ASCII lowercase comparison of two strings.
- Description
- The result is true if and only if second string
represents the same sequence of characters as the first string,
ignoring the case.
Character values between 65 and 90 (ASCII A-Z) are interpreted as
values between 97 and 122 (ASCII a-z).
Since this method is optimized for performance, the ASCII character
values are not converted in any way. The caller has to make sure that
all ASCII characters are in the allowed range between 0 and
127. The ASCII string must be NULL-terminated and must be greater or
equal as asciiStrLength.
This function can't be used for language specific comparison.
- Parameters
asciiStr |
the 8-Bit ASCII character string to be compared.
|
asciiStrLength |
the length of the ascii string
|
- Return
- sal_True if the strings are equal;
sal_False, otherwise.
- matchAsciiL
- sal_Bool matchAsciiL(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Match against a substring appearing in this string.
- Description
- The result is true if and only if the second string appears as a substring
of this string, at the given position.
Since this method is optimized for performance, the ASCII character
values are not converted in any way. The caller has to make sure that
all ASCII characters are in the allowed range between 0 and
127. The ASCII string must be NULL-terminated and must be greater or
equal as asciiStrLength.
This function can't be used for language specific comparison.
- Parameters
str |
the object (substring) to be compared.
|
fromIndex |
the index to start the comparion from.
The index must be greater or equal than 0
and less or equal as the string length.
|
- Return
- sal_True if str match with the characters in the string
at the given position;
sal_False, otherwise.
- matchIgnoreAsciiCaseAsciiL
- sal_Bool matchIgnoreAsciiCaseAsciiL(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Match against a substring appearing in this string, ignoring the case of
ASCII letters.
- Description
- The result is true if and only if the second string appears as a substring
of this string, at the given position.
Character values between 65 and 90 (ASCII A-Z) are interpreted as
values between 97 and 122 (ASCII a-z).
Since this method is optimized for performance, the ASCII character
values are not converted in any way. The caller has to make sure that
all ASCII characters are in the allowed range between 0 and
127. The ASCII string must be NULL-terminated and must be greater or
equal as asciiStrLength.
This function can't be used for language specific comparison.
- Parameters
asciiStr |
the 8-Bit ASCII character string to be compared.
|
asciiStrLength |
the length of the ascii string
|
fromIndex |
the index to start the comparion from.
The index must be greater or equal than 0
and less or equal as the string length.
|
- Return
- sal_True if str match with the characters in the string
at the given position;
sal_False, otherwise.
- endsWithAsciiL
- bool endsWithAsciiL(
const char * |
asciiStr, |
sal_Int32 |
asciiStrLength ) const; |
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Check whether this string ends with a given ASCII string.
- Parameters
asciiStr |
a sequence of at least asciiStrLength ASCII characters
(bytes in the range 0x00--0x7F)
|
asciiStrLen |
the length of asciiStr; must be non-negative
|
- Return
- true if this string ends with asciiStr; otherwise, false is
returned
- Since
- UDK 3.2.7
- endsWithIgnoreAsciiCaseAsciiL
- bool endsWithIgnoreAsciiCaseAsciiL(
const char * |
asciiStr, |
sal_Int32 |
asciiStrLength ) const; |
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Check whether this string ends with a given ASCII string, ignoring the
case of ASCII letters.
- Parameters
asciiStr |
a sequence of at least asciiStrLength ASCII characters
(bytes in the range 0x00--0x7F)
|
asciiStrLen |
the length of asciiStr; must be non-negative
|
- Return
- true if this string ends with asciiStr, ignoring the case of ASCII
letters ("A"--"Z" and "a"--"z"); otherwise, false is returned
- hashCode
- sal_Int32 hashCode() throw();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns a hashcode for this string.
- Return
- a hash code value for this object.
- See Also
- rtl::OUStringHash
for
convenient
use
of
STLPort's
hash_map
- indexOf
- sal_Int32 indexOf(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns the index within this string of the first occurrence of the
specified character, starting the search at the specified index.
- Parameters
ch |
character to be located.
|
fromIndex |
the index to start the search from.
The index must be greater or equal than 0
and less or equal as the string length.
|
- Return
- the index of the first occurrence of the character in the
character sequence represented by this string that is
greater than or equal to fromIndex, or
-1 if the character does not occur.
- lastIndexOf
- sal_Int32 lastIndexOf(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns the index within this string of the last occurrence of the
specified character, searching backward starting at the end.
- Parameters
ch |
character to be located.
|
- Return
- the index of the last occurrence of the character in the
character sequence represented by this string, or
-1 if the character does not occur.
- lastIndexOf
- sal_Int32 lastIndexOf(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Description
- Returns the index within this string of the last occurrence of the
specified character, searching backward starting before the specified
index.
- Parameters
ch |
character to be located.
|
fromIndex |
the index before which to start the search.
|
- Return
- the index of the last occurrence of the character in the
character sequence represented by this string that
is less than fromIndex, or -1
if the character does not occur before that point.
- indexOf
- sal_Int32 indexOf(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns the index within this string of the first occurrence of the
specified substring, starting at the specified index.
- Description
- If str doesn't include any character, always -1 is
returned. This is also the case, if both strings are empty.
- Parameters
str |
the substring to search for.
|
fromIndex |
the index to start the search from.
|
- Return
- If the string argument occurs one or more times as a substring
within this string at the starting index, then the index
of the first character of the first such substring is
returned. If it does not occur as a substring starting
at fromIndex or beyond, -1 is returned.
- indexOfAsciiL
- sal_Int32 indexOfAsciiL(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns the index within this string of the first occurrence of the
specified ASCII substring, starting at the specified index.
- Parameters
str |
the substring to be searched for. Need not be null-terminated, but must
be at least as long as the specified len. Must only contain characters
in the ASCII range 0x00--7F.
|
len |
the length of the substring; must be non-negative.
|
fromIndex |
the index to start the search from. Must be in the range from zero to
the length of this string, inclusive.
|
- Return
-
the index (starting at 0) of the first character of the first occurrence
of the substring within this string starting at the given fromIndex, or
-1 if the substring does not occur. If len is zero, -1 is returned.
- Since
- UDK 3.2.7
- lastIndexOf
- sal_Int32 lastIndexOf(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns the index within this string of the last occurrence of
the specified substring, searching backward starting at the end.
- Description
- The returned index indicates the starting index of the substring
in this string.
If str doesn't include any character, always -1 is
returned. This is also the case, if both strings are empty.
- Parameters
str |
the substring to search for.
|
- Return
- If the string argument occurs one or more times as a substring
within this string, then the index of the first character of
the last such substring is returned. If it does not occur as
a substring, -1 is returned.
- lastIndexOf
- sal_Int32 lastIndexOf(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Description
- Returns the index within this string of the last occurrence of
the specified substring, searching backward starting before the specified
index.
The returned index indicates the starting index of the substring
in this string.
If str doesn't include any character, always -1 is
returned. This is also the case, if both strings are empty.
- Parameters
str |
the substring to search for.
|
fromIndex |
the index before which to start the search.
|
- Return
- If the string argument occurs one or more times as a substring
within this string before the starting index, then the index
of the first character of the last such substring is
returned. Otherwise, -1 is returned.
- lastIndexOfAsciiL
- sal_Int32 lastIndexOfAsciiL(
const char * |
str, |
sal_Int32 |
len ) const throw(); |
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns the index within this string of the last occurrence of the
specified ASCII substring.
- Parameters
str |
the substring to be searched for. Need not be null-terminated, but must
be at least as long as the specified len. Must only contain characters
in the ASCII range 0x00--7F.
|
len |
the length of the substring; must be non-negative.
|
- Return
-
the index (starting at 0) of the first character of the last occurrence
of the substring within this string, or -1 if the substring does not
occur. If len is zero, -1 is returned.
- Since
- UDK 3.2.7
- copy
- OUString copy(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns a new string that is a substring of this string.
- Description
- The substring begins at the specified beginIndex. It is an error for
beginIndex to be negative or to be greater than the length of this string.
- Parameters
beginIndex |
the beginning index, inclusive.
|
- Return
- the specified substring.
- copy
- OUString copy(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns a new string that is a substring of this string.
- Description
- The substring begins at the specified beginIndex and contains count
characters. It is an error for either beginIndex or count to be negative,
or for beginIndex + count to be greater than the length of this string.
- Parameters
beginIndex |
the beginning index, inclusive.
|
count |
the number of characters.
|
- Return
- the specified substring.
- concat
- OUString concat(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Concatenates the specified string to the end of this string.
- Parameters
str |
the string that is concatenated to the end
of this string.
|
- Return
- a string that represents the concatenation of this string
followed by the string argument.
- replaceAt
- OUString replaceAt(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns a new string resulting from replacing n = count characters
from position index in this string with newStr.
- Parameters
index |
the replacing index in str.
The index must be greater or equal as 0 and
less or equal as the length of the string.
|
count |
the count of charcters that will replaced
The count must be greater or equal as 0 and
less or equal as the length of the string minus index.
|
newStr |
the new substring.
|
- Return
- the new string.
- replace
- OUString replace(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns a new string resulting from replacing all occurrences of
oldChar in this string with newChar.
- Description
- If the character oldChar does not occur in the character sequence
represented by this object, then the string is assigned with
str.
- Parameters
oldChar |
the old character.
|
newChar |
the new character.
|
- Return
- a string derived from this string by replacing every
occurrence of oldChar with newChar.
- toAsciiLowerCase
- OUString toAsciiLowerCase() throw();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Converts from this string all ASCII uppercase characters (65-90)
to ASCII lowercase characters (97-122).
- Description
- This function can't be used for language specific conversion.
If the string doesn't contain characters which must be converted,
then the new string is assigned with str.
- Return
- the string, converted to ASCII lowercase.
- toAsciiUpperCase
- OUString toAsciiUpperCase() throw();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Converts from this string all ASCII lowercase characters (97-122)
to ASCII uppercase characters (65-90).
- Description
- This function can't be used for language specific conversion.
If the string doesn't contain characters which must be converted,
then the new string is assigned with str.
- Return
- the string, converted to ASCII uppercase.
- trim
- OUString trim() throw();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns a new string resulting from removing white space from both ends
of the string.
- Description
- All characters that have codes less than or equal to
32 (the space character) are considered to be white space.
If the string doesn't contain white spaces at both ends,
then the new string is assigned with str.
- Return
- the string, with white space removed from the front and end.
- getToken
- OUString getToken(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns a token in the string.
- Description
- Example:
sal_Int32 nIndex = 0;
do
{
...
OUString aToken = aStr.getToken( 0, ';', nIndex );
...
}
while ( nIndex >= 0 );
- Parameters
token |
the number of the token to return
|
cTok |
the character which seperate the tokens.
|
index |
the position at which the token is searched in the
string.
The index must not be greater than the length of the
string.
This param is set to the position of the
next token or to -1, if it is the last token.
|
- Return
- the token; if either token or index is negative, an empty token
is returned (and index is set to -1)
- toBoolean
- sal_Bool toBoolean() throw();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns the Boolean value from this string.
- Description
- This function can't be used for language specific conversion.
- Return
- sal_True, if the string is 1 or "True" in any ASCII case.
sal_False in any other case.
- toChar
- sal_Unicode toChar() throw();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns the first character from this string.
- Return
- the first character from this string or 0, if this string
is emptry.
- toInt32
- sal_Int32 toInt32(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns the int32 value from this string.
- Description
- This function can't be used for language specific conversion.
- Parameters
radix |
the radix (between 2 and 36)
|
- Return
- the int32 represented from this string.
0 if this string represents no number.
- toInt64
- sal_Int64 toInt64(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns the int64 value from this string.
- Description
- This function can't be used for language specific conversion.
- Parameters
radix |
the radix (between 2 and 36)
|
- Return
- the int64 represented from this string.
0 if this string represents no number.
- toFloat
- float toFloat() throw();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns the float value from this string.
- Description
- This function can't be used for language specific conversion.
- Return
- the float represented from this string.
0.0 if this string represents no number.
- toDouble
- double toDouble() throw();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Returns the double value from this string.
- Description
- This function can't be used for language specific conversion.
- Return
- the double represented from this string.
0.0 if this string represents no number.
- intern
- OUString intern();
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
YES |
NO |
- Summary
- Return a canonical representation for a string.
- Description
- A pool of strings, initially empty is maintained privately
by the string class. On invocation, if present in the pool
the original string will be returned. Otherwise this string,
or a copy thereof will be added to the pool and returned.
- Return
-
a version of the string from the pool.
- Since
- UDK 3.2.7
- convertToString
- bool convertToString(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Converts to an OString, signalling failure.
- Parameters
pTarget |
An out parameter receiving the converted OString. Must not be null; the
contents are not modified if conversion fails (convertToOString returns
false).
|
nEncoding |
The text encoding to convert into. Must be an octet encoding (i.e.,
rtl_isOctetTextEncoding(nEncoding) must return true).
|
nFlags |
A combination of RTL_UNICODETOTEXT_FLAGS that detail how to do the
conversion (see rtl_convertUnicodeToText). RTL_UNICODETOTEXT_FLAGS_FLUSH
need not be included, it is implicitly assumed. Typical uses are either
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR |
RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR (fail if a Unicode character cannot
be converted to the target nEncoding) or OUSTRING_TO_OSTRING_CVTFLAGS
(make a best efforts conversion).
|
- Return
-
True if the conversion succeeded, false otherwise.
- iterateCodePoints
- sal_uInt32 iterateCodePoints(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
YES |
NO |
NO |
NO |
YES |
NO |
- Summary
- Iterate through this string based on code points instead of UTF-16 code
units.
- Description
- See Chapter 3 of The Unicode Standard 5.0 (Addison--Wesley, 2006) for
definitions of the various terms used in this description.
This string is interpreted as a sequence of zero or more UTF-16 code
units. For each index into this sequence (from zero to one less than
the length of the sequence, inclusive), a code point represented
starting at the given index is computed as follows:
- If the UTF-16 code unit addressed by the index constitutes a
well-formed UTF-16 code unit sequence, the computed code point is the
scalar value encoded by that UTF-16 code unit sequence.
- Otherwise, if the index is at least two UTF-16 code units away from
the end of the sequence, and the sequence of two UTF-16 code units
addressed by the index constitutes a well-formed UTF-16 code unit
sequence, the computed code point is the scalar value encoded by that
UTF-16 code unit sequence.
- Otherwise, the computed code point is the UTF-16 code unit addressed
by the index. (This last case catches unmatched surrogates as well as
indices pointing into the middle of surrogate pairs.)
- Parameters
indexUtf16 |
pointer to a UTF-16 based index into this string; must not be null. On
entry, the index must be in the range from zero to the length of this
string (in UTF-16 code units), inclusive. Upon successful return, the
index will be updated to address the UTF-16 code unit that is the given
incrementCodePoints away from the initial index.
|
incrementCodePoints |
the number of code points to move the given *indexUtf16. If
non-negative, moving is done after determining the code point at the
index. If negative, moving is done before determining the code point
at the (then updated) index. The value must be such that the resulting
UTF-16 based index is in the range from zero to the length of this
string (in UTF-16 code units), inclusive.
|
- Return
-
the code point (an integer in the range from 0 to 0x10FFFF, inclusive)
that is represented within this string starting at the index computed as
follows: If incrementCodePoints is non-negative, the index is the
initial value of *indexUtf16; if incrementCodePoints is negative, the
index is the updated value of *indexUtf16. In either case, the computed
index must be in the range from zero to one less than the length of this
string (in UTF-16 code units), inclusive.
- Since
- UDK 3.2.7
- unacquired
- static const OUString & unacquired(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
YES |
YES |
NO |
- Description
- Provides an OUString const & passing a storage pointer of an
rtl_uString * handle.
It is more convenient to use C++ OUString member functions when dealing
with rtl_uString * handles. Using this function avoids unnecessary
acquire()/release() calls for a temporary OUString object.
- Parameters
ppHandle |
pointer to storage
|
- Return
-
OUString const & based on given storage
- intern
- static OUString intern(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
YES |
YES |
NO |
- Summary
- Return a canonical representation for a converted string.
- Description
- A pool of strings, initially empty is maintained privately
by the string class. On invocation, if present in the pool
the original string will be returned. Otherwise this string,
or a copy thereof will be added to the pool and returned.
- Parameters
value |
a 8-Bit character array.
|
length |
the number of character which should be converted.
The 8-Bit character array length must be
greater or equal than this value.
|
encoding |
the text encoding from which the 8-Bit character
sequence should be converted.
|
convertFlags |
flags which controls the conversion.
see RTL_TEXTTOUNICODE_FLAGS_...
|
pInfo |
pointer to return conversion status or NULL.
|
- Return
-
a version of the converted string from the pool.
- Since
- UDK 3.2.7
- valueOf
- static OUString valueOf(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
YES |
YES |
NO |
- Summary
- Returns the string representation of the sal_Bool argument.
- Description
- If the sal_Bool is true, the string "true" is returned.
If the sal_Bool is false, the string "false" is returned.
This function can't be used for language specific conversion.
- Parameters
-
- Return
- a string with the string representation of the argument.
- valueOf
- static OUString valueOf(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
YES |
YES |
NO |
- Summary
- Returns the string representation of the char argument.
- Parameters
-
- Return
- a string with the string representation of the argument.
- valueOf
- static OUString valueOf(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
YES |
YES |
NO |
- Summary
- Returns the string representation of the int argument.
- Description
- This function can't be used for language specific conversion.
- Parameters
i |
a int32.
|
radix |
the radix (between 2 and 36)
|
- Return
- a string with the string representation of the argument.
- valueOf
- static OUString valueOf(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
YES |
YES |
NO |
- Summary
- Returns the string representation of the long argument.
- Description
- This function can't be used for language specific conversion.
- Parameters
ll |
a int64.
|
radix |
the radix (between 2 and 36)
|
- Return
- a string with the string representation of the argument.
- valueOf
- static OUString valueOf(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
YES |
YES |
NO |
- Summary
- Returns the string representation of the float argument.
- Description
- This function can't be used for language specific conversion.
- Parameters
-
- Return
- a string with the string representation of the argument.
- valueOf
- static OUString valueOf(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
YES |
YES |
NO |
- Summary
- Returns the string representation of the double argument.
- Description
- This function can't be used for language specific conversion.
- Parameters
-
- Return
- a string with the string representation of the argument.
- createFromAscii
- static OUString createFromAscii(
-
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
YES |
YES |
NO |
- Summary
- Returns a OUString copied without conversion from an ASCII
character string.
- Description
- Since this method is optimized for performance, the ASCII character
values are not converted in any way. The caller has to make sure that
all ASCII characters are in the allowed range between 0 and
127. The ASCII string must be NULL-terminated.
- Parameters
value |
the 8-Bit ASCII character string
|
- Return
- a string with the string representation of the argument.
Top of Page
Copyright © 2012, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.