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 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
- OUString(
const String & |
value ) throw(); |
virtual |
abstract |
const |
volatile |
template |
static |
inline |
C-linkage |
NO |
NO |
NO |
NO |
NO |
NO |
NO |
NO |
- Summary
- Convert a String (from the tools module) into an OUString.
- Description
- Since both String and OUString internally use the same data structure,
this is a very cheap operation.
-
~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
- Perform a comparison of a substring in this string.
- Description
- The result is true if and only if second string
represents the same sequence of characters in the first 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
- Perform a ASCII lowercase comparison of a substring in this string.
- Description
- The result is true if and only if second string
represents the same sequence of characters in the first 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
- Perform a comparison of a substring in this string.
- Description
- The result is true if and only if second string
represents the same sequence of characters in the first 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
- Perform a ASCII lowercase comparison of a substring in this string.
- Description
- The result is true if and only if second string
represents the same sequence of characters in the first 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.
-
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.
-
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 |
- Summary
- Returns the index within this string of the last occurrence of the
specified character, searching backward starting at the specified index.
- Parameters
ch |
character to be located.
|
- Return
- the index of the last occurrence of the character in the
character sequence represented by this string that
is less or than or equal to 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.
-
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 |
- 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.
|
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 last such substring is
returned. If it does not occur as a substring starting
at fromIndex or earlier, -1 is returned.
-
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.
- 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
extends to the character at index endIndex - 1.
- 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. The number
must be greater or equal as 0.
|
cTok |
the character which seperate the tokens.
|
index |
the position at which the token is searched in the
string.
The index must be greater or equal as 0 and
less or equal as 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
-
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.
-
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
l |
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 2002 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, CA 94303 USA.