LibreOffice
LibreOffice 24.2 SDK C/C++ API Reference
|
This String class provide base functionality for C++ like 8-Bit character array handling. More...
#include <string.hxx>
Public Member Functions | |
OString () | |
New string containing no characters. More... | |
OString (const OString &str) | |
New string from OString. More... | |
OString (rtl_String *str) | |
New string from OString data. More... | |
OString (rtl_String *str, __sal_NoAcquire) | |
New string from OString data without acquiring it. More... | |
OString (char value) | |
New string from a single character. More... | |
template<typename T > | |
OString (const T &value, typename libreoffice_internal::CharPtrDetector< T, libreoffice_internal::Dummy >::Type=libreoffice_internal::Dummy()) | |
New string from a character buffer array. More... | |
template<typename T > | |
OString (T &value, typename libreoffice_internal::NonConstCharArrayDetector< T, libreoffice_internal::Dummy >::Type=libreoffice_internal::Dummy()) | |
template<typename T > | |
OString (T &literal, typename libreoffice_internal::ConstCharArrayDetector< T, libreoffice_internal::Dummy >::Type=libreoffice_internal::Dummy()) | |
New string from a string literal. More... | |
OString (const char *value, sal_Int32 length) | |
New string from a character buffer array. More... | |
OString (const sal_Unicode *value, sal_Int32 length, rtl_TextEncoding encoding, sal_uInt32 convertFlags=OUSTRING_TO_OSTRING_CVTFLAGS) | |
New string from a Unicode character buffer array. More... | |
~OString () | |
Release the string data. More... | |
OString & | operator= (const OString &str) |
Assign a new string. More... | |
template<typename T > | |
libreoffice_internal::ConstCharArrayDetector< T, OString &>::Type | operator= (T &literal) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument. More... | |
OString & | operator+= (const OString &str) |
Append a string to this string. More... | |
void | clear () |
Clears the string, i.e, makes a zero-character string. More... | |
sal_Int32 | getLength () const |
Returns the length of this string. More... | |
bool | isEmpty () const |
Checks if a string is empty. More... | |
const char * | getStr () const SAL_RETURNS_NONNULL |
Returns a pointer to the characters of this string. More... | |
char | operator[] (sal_Int32 index) const |
Access to individual characters. More... | |
sal_Int32 | compareTo (const OString &str) const |
Compares two strings. More... | |
sal_Int32 | compareTo (const OString &rObj, sal_Int32 maxLength) const |
Compares two strings with an maximum count of characters. More... | |
sal_Int32 | reverseCompareTo (const OString &str) const |
Compares two strings in reverse order. More... | |
bool | equals (const OString &str) const |
Perform a comparison of two strings. More... | |
bool | equalsL (const char *value, sal_Int32 length) const |
Perform a comparison of two strings. More... | |
bool | equalsIgnoreAsciiCase (const OString &str) const |
Perform an ASCII lowercase comparison of two strings. More... | |
template<typename T > | |
libreoffice_internal::CharPtrDetector< T, bool >::Type | equalsIgnoreAsciiCase (const T &asciiStr) const |
Perform an ASCII lowercase comparison of two strings. More... | |
template<typename T > | |
libreoffice_internal::NonConstCharArrayDetector< T, bool >::Type | equalsIgnoreAsciiCase (T &asciiStr) const |
template<typename T > | |
libreoffice_internal::ConstCharArrayDetector< T, bool >::Type | equalsIgnoreAsciiCase (T &literal) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument. More... | |
bool | equalsIgnoreAsciiCaseL (const char *asciiStr, sal_Int32 asciiStrLength) const |
Perform an ASCII lowercase comparison of two strings. More... | |
bool | match (const OString &str, sal_Int32 fromIndex=0) const |
Match against a substring appearing in this string. More... | |
template<typename T > | |
libreoffice_internal::ConstCharArrayDetector< T, bool >::Type | match (T &literal, sal_Int32 fromIndex=0) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument. More... | |
bool | matchL (char const *str, sal_Int32 strLength, sal_Int32 fromIndex=0) const |
Match against a substring appearing in this string. More... | |
bool | matchIgnoreAsciiCase (const OString &str, sal_Int32 fromIndex=0) const |
Match against a substring appearing in this string, ignoring the case of ASCII letters. More... | |
template<typename T > | |
libreoffice_internal::ConstCharArrayDetector< T, bool >::Type | matchIgnoreAsciiCase (T &literal, sal_Int32 fromIndex=0) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument. More... | |
bool | startsWith (OString const &str, OString *rest=NULL) const |
Check whether this string starts with a given substring. More... | |
template<typename T > | |
libreoffice_internal::ConstCharArrayDetector< T, bool >::Type | startsWith (T &literal, OString *rest=NULL) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument. More... | |
bool | startsWithIgnoreAsciiCase (OString const &str, OString *rest=NULL) const |
Check whether this string starts with a given string, ignoring the case of ASCII letters. More... | |
template<typename T > | |
libreoffice_internal::ConstCharArrayDetector< T, bool >::Type | startsWithIgnoreAsciiCase (T &literal, OString *rest=NULL) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument. More... | |
bool | endsWith (OString const &str, OString *rest=NULL) const |
Check whether this string ends with a given substring. More... | |
template<typename T > | |
libreoffice_internal::ConstCharArrayDetector< T, bool >::Type | endsWith (T &literal, OString *rest=NULL) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument. More... | |
bool | endsWithL (char const *str, sal_Int32 strLength) const |
Check whether this string ends with a given substring. More... | |
sal_Int32 | hashCode () const |
Returns a hashcode for this string. More... | |
sal_Int32 | indexOf (char ch, sal_Int32 fromIndex=0) const |
Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index. More... | |
sal_Int32 | lastIndexOf (char ch) const |
Returns the index within this string of the last occurrence of the specified character, searching backward starting at the end. More... | |
sal_Int32 | lastIndexOf (char ch, sal_Int32 fromIndex) const |
Returns the index within this string of the last occurrence of the specified character, searching backward starting before the specified index. More... | |
sal_Int32 | indexOf (const OString &str, sal_Int32 fromIndex=0) const |
Returns the index within this string of the first occurrence of the specified substring, starting at the specified index. More... | |
template<typename T > | |
libreoffice_internal::ConstCharArrayDetector< T, sal_Int32 >::Type | indexOf (T &literal, sal_Int32 fromIndex=0) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument. More... | |
sal_Int32 | indexOfL (char const *str, sal_Int32 len, sal_Int32 fromIndex=0) const |
Returns the index within this string of the first occurrence of the specified substring, starting at the specified index. More... | |
sal_Int32 | lastIndexOf (const OString &str) const |
Returns the index within this string of the last occurrence of the specified substring, searching backward starting at the end. More... | |
sal_Int32 | lastIndexOf (const OString &str, sal_Int32 fromIndex) const |
Returns the index within this string of the last occurrence of the specified substring, searching backward starting before the specified index. More... | |
SAL_WARN_UNUSED_RESULT OString | copy (sal_Int32 beginIndex) const |
Returns a new string that is a substring of this string. More... | |
SAL_WARN_UNUSED_RESULT OString | copy (sal_Int32 beginIndex, sal_Int32 count) const |
Returns a new string that is a substring of this string. More... | |
SAL_WARN_UNUSED_RESULT OString | concat (const OString &str) const |
Concatenates the specified string to the end of this string. More... | |
SAL_WARN_UNUSED_RESULT OString | replaceAt (sal_Int32 index, sal_Int32 count, const OString &newStr) const |
Returns a new string resulting from replacing n = count characters from position index in this string with newStr. More... | |
SAL_WARN_UNUSED_RESULT OString | replace (char oldChar, char newChar) const |
Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar. More... | |
SAL_WARN_UNUSED_RESULT OString | replaceFirst (OString const &from, OString const &to, sal_Int32 *index=NULL) const |
Returns a new string resulting from replacing the first occurrence of a given substring with another substring. More... | |
SAL_WARN_UNUSED_RESULT OString | replaceAll (OString const &from, OString const &to) const |
Returns a new string resulting from replacing all occurrences of a given substring with another substring. More... | |
SAL_WARN_UNUSED_RESULT OString | toAsciiLowerCase () const |
Converts from this string all ASCII uppercase characters (65-90) to ASCII lowercase characters (97-122). More... | |
SAL_WARN_UNUSED_RESULT OString | toAsciiUpperCase () const |
Converts from this string all ASCII lowercase characters (97-122) to ASCII uppercase characters (65-90). More... | |
SAL_WARN_UNUSED_RESULT OString | trim () const |
Returns a new string resulting from removing white space from both ends of the string. More... | |
OString | getToken (sal_Int32 token, char cTok, sal_Int32 &index) const |
Returns a token in the string. More... | |
OString | getToken (sal_Int32 count, char separator) const |
Returns a token from the string. More... | |
bool | toBoolean () const |
Returns the Boolean value from this string. More... | |
char | toChar () const |
Returns the first character from this string. More... | |
sal_Int32 | toInt32 (sal_Int16 radix=10) const |
Returns the int32 value from this string. More... | |
sal_uInt32 | toUInt32 (sal_Int16 radix=10) const |
Returns the uint32 value from this string. More... | |
sal_Int64 | toInt64 (sal_Int16 radix=10) const |
Returns the int64 value from this string. More... | |
sal_uInt64 | toUInt64 (sal_Int16 radix=10) const |
Returns the uint64 value from this string. More... | |
float | toFloat () const |
Returns the float value from this string. More... | |
double | toDouble () const |
Returns the double value from this string. More... | |
Static Public Member Functions | |
static OString | number (int i, sal_Int16 radix=10) |
Returns the string representation of the integer argument. More... | |
static OString | number (unsigned int i, sal_Int16 radix=10) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
static OString | number (long i, sal_Int16 radix=10) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
static OString | number (unsigned long i, sal_Int16 radix=10) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
static OString | number (long long ll, sal_Int16 radix=10) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
static OString | number (unsigned long long ll, sal_Int16 radix=10) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
static OString | number (float f) |
Returns the string representation of the float argument. More... | |
static OString | number (double d) |
Returns the string representation of the double argument. More... | |
static OString | valueOf (sal_Bool b) |
Returns the string representation of the sal_Bool argument. More... | |
static OString | boolean (bool b) |
Returns the string representation of the boolean argument. More... | |
static OString | valueOf (char c) |
Returns the string representation of the char argument. More... | |
static OString | valueOf (sal_Int32 i, sal_Int16 radix=10) |
Returns the string representation of the int argument. More... | |
static OString | valueOf (sal_Int64 ll, sal_Int16 radix=10) |
Returns the string representation of the long argument. More... | |
static OString | valueOf (float f) |
Returns the string representation of the float argument. More... | |
static OString | valueOf (double d) |
Returns the string representation of the double argument. More... | |
Friends | |
bool | operator== (const OString &rStr1, const OString &rStr2) |
bool | operator!= (const OString &rStr1, const OString &rStr2) |
bool | operator< (const OString &rStr1, const OString &rStr2) |
bool | operator> (const OString &rStr1, const OString &rStr2) |
bool | operator<= (const OString &rStr1, const OString &rStr2) |
bool | operator>= (const OString &rStr1, const OString &rStr2) |
template<typename T > | |
libreoffice_internal::CharPtrDetector< T, bool >::Type | operator== (const OString &rStr1, const T &value) |
template<typename T > | |
libreoffice_internal::NonConstCharArrayDetector< T, bool >::Type | operator== (const OString &rStr1, T &value) |
template<typename T > | |
libreoffice_internal::CharPtrDetector< T, bool >::Type | operator== (const T &value, const OString &rStr2) |
template<typename T > | |
libreoffice_internal::NonConstCharArrayDetector< T, bool >::Type | operator== (T &value, const OString &rStr2) |
template<typename T > | |
libreoffice_internal::ConstCharArrayDetector< T, bool >::Type | operator== (const OString &rStr, T &literal) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument. More... | |
template<typename T > | |
libreoffice_internal::ConstCharArrayDetector< T, bool >::Type | operator== (T &literal, const OString &rStr) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument. More... | |
template<typename T > | |
libreoffice_internal::CharPtrDetector< T, bool >::Type | operator!= (const OString &rStr1, const T &value) |
template<typename T > | |
libreoffice_internal::NonConstCharArrayDetector< T, bool >::Type | operator!= (const OString &rStr1, T &value) |
template<typename T > | |
libreoffice_internal::CharPtrDetector< T, bool >::Type | operator!= (const T &value, const OString &rStr2) |
template<typename T > | |
libreoffice_internal::NonConstCharArrayDetector< T, bool >::Type | operator!= (T &value, const OString &rStr2) |
template<typename T > | |
libreoffice_internal::ConstCharArrayDetector< T, bool >::Type | operator!= (const OString &rStr, T &literal) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument. More... | |
template<typename T > | |
libreoffice_internal::ConstCharArrayDetector< T, bool >::Type | operator!= (T &literal, const OString &rStr) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument. More... | |
OString | operator+ (const OString &str1, const OString &str2) |
This String class provide base functionality for C++ like 8-Bit character array handling.
The advantage of this class is, that it handle all the memory management 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 provides only readonly string handling. So you could create a string and you could only query the content from this string. It provides 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 to change the string content, then you should use the OStringBuffer class, which provides these functionalities and avoid too 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.
|
inline |
New string containing no characters.
|
inline |
|
inline |
|
inline |
|
inlineexplicit |
New string from a single character.
value | a character. |
|
inline |
New string from a character buffer array.
Note: The argument type is always either char* or const char*. The template is used only for technical reasons, as is the second argument.
value | a NULL-terminated character array. |
|
inline |
|
inline |
New string from a string literal.
If there are any embedded \0's in the string literal, the result is undefined. Use the overload that explicitly accepts length.
literal | a string literal |
|
inline |
New string from a character buffer array.
value | a character array. |
length | the number of character which should be copied. The character array length must be greater or equal than this value. |
|
inline |
New string from a Unicode character buffer array.
value | a Unicode character array. |
length | the number of character which should be converted. The Unicode character array length must be greater or equal than this value. |
encoding | the text encoding in which the Unicode character sequence should be converted. |
convertFlags | flags which controls the conversion. see RTL_UNICODETOTEXT_FLAGS_... |
std::bad_alloc | is thrown if an out-of-memory condition occurs |
|
inline |
Release the string data.
|
inlinestatic |
Returns the string representation of the boolean argument.
If the argument is true, the string "true" is returned. If the argument is false, the string "false" is returned. This function can't be used for language specific conversion.
b | a bool. |
|
inline |
Clears the string, i.e, makes a zero-character string.
|
inline |
Compares two strings.
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.
str | the object to be compared. |
|
inline |
Compares two strings with an maximum count of characters.
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.
rObj | the object to be compared. |
maxLength | the maximum count of characters to be compared. |
|
inline |
Concatenates the specified string to the end of this string.
str | the string that is concatenated to the end of this string. |
|
inline |
Returns a new string that is a substring of this string.
The substring begins at the specified beginIndex. If beginIndex is negative or be greater than the length of this string, behaviour is undefined.
beginIndex | the beginning index, inclusive. |
|
inline |
Returns a new string that is a substring of this string.
The substring begins at the specified beginIndex and contains count characters. If either beginIndex or count are negative, or beginIndex + count are greater than the length of this string then behaviour is undefined.
beginIndex | the beginning index, inclusive. |
count | the number of characters. |
Check whether this string ends with a given substring.
str | the substring to be compared |
rest | if non-null, and this function returns true, then assign a copy of the remainder of this string to *rest. Available since LibreOffice 4.2 |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument.
|
inline |
Check whether this string ends with a given substring.
str | the substring to be compared; must not be null and must point to memory of at least strLength bytes |
strLength | the length of the substring; must be non-negative |
|
inline |
Perform a comparison of two strings.
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.
str | the object to be compared. |
|
inline |
Perform an ASCII lowercase comparison of two strings.
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.
str | the object to be compared. |
|
inline |
Perform an ASCII lowercase comparison of two strings.
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
Note: The argument type is always either char* or const char*, the return type is bool. The template is used only for technical reasons.
asciiStr | the 8-Bit ASCII character string to be compared. |
|
inline |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument.
|
inline |
Perform an ASCII lowercase comparison of two strings.
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
asciiStr | the 8-Bit ASCII character string to be compared. |
asciiStrLength | the length of the ascii string |
|
inline |
Perform a comparison of two strings.
The result is true if and only if second string represents the same sequence of characters as the first string. The ASCII string must be greater or equal as length. This function can't be used for language specific comparison.
value | a character array. |
length | the length of the character array. |
|
inline |
Returns the length of this string.
The length is equal to the number of characters in this string.
|
inline |
Returns a pointer to the characters of this string.
The returned pointer is guaranteed to point to a null-terminated byte string. But note that this string object may contain embedded null characters, which will thus also be embedded in the returned null-terminated byte string.
|
inline |
Returns a token in the string.
Example: sal_Int32 nIndex = 0; do { ... OString aToken = aStr.getToken( 0, ';', nIndex ); ... } while ( nIndex >= 0 );
token | the number of the token to return. |
cTok | the character which separate 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. |
|
inline |
Returns a token from the string.
The same as getToken(sal_Int32, char, sal_Int32 &), but always passing in 0 as the start index in the third argument.
count | the number of the token to return, starting with 0 |
separator | the character which separates the tokens |
|
inline |
Returns a hashcode for this string.
|
inline |
Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index.
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. |
|
inline |
Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.
If str doesn't include any character, always -1 is returned. This is also the case, if both strings are empty.
str | the substring to search for. |
fromIndex | the index to start the search from. |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument.
|
inline |
Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.
If str doesn't include any character, always -1 is returned. This is also the case, if both strings are empty.
str | the substring to search for. |
len | the length of the substring. |
fromIndex | the index to start the search from. |
|
inline |
Checks if a string is empty.
|
inline |
Returns the index within this string of the last occurrence of the specified character, searching backward starting at the end.
ch | character to be located. |
|
inline |
Returns the index within this string of the last occurrence of the specified character, searching backward starting before the specified index.
ch | character to be located. |
fromIndex | the index before which to start the search. |
|
inline |
Returns the index within this string of the last occurrence of the specified substring, searching backward starting at the end.
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.
str | the substring to search for. |
|
inline |
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.
str | the substring to search for. |
fromIndex | the index before which to start the search. |
|
inline |
Match against a substring appearing in this string.
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.
str | the object (substring) to be compared. |
fromIndex | the index to start the comparison from. The index must be greater or equal than 0 and less or equal as the string length. |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument.
|
inline |
Match against a substring appearing in this string, ignoring the case of ASCII letters.
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.
str | the object (substring) to be compared. |
fromIndex | the index to start the comparison from. The index must be greater or equal than 0 and less or equal as the string length. |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument.
|
inline |
Match against a substring appearing in this string.
str | the substring to be compared; must not be null and must point to memory of at least strLength bytes |
strLength | the length of the substring; must be non-negative |
fromIndex | the index into this string to start the comparison at; must be non-negative and not greater than this string's length |
|
inlinestatic |
Returns the string representation of the integer argument.
This function can't be used for language specific conversion.
i | an integer value |
radix | the radix (between 2 and 36) |
|
inlinestatic |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlinestatic |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlinestatic |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlinestatic |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlinestatic |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlinestatic |
Returns the string representation of the float argument.
This function can't be used for language specific conversion.
f | a float. |
|
inlinestatic |
Returns the string representation of the double argument.
This function can't be used for language specific conversion.
d | a double. |
Append a string to this string.
str | an OString. |
Assign a new string.
str | an OString. |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument.
|
inline |
Access to individual characters.
index | must be non-negative and less than length. |
|
inline |
Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.
If the character oldChar does not occur in the character sequence represented by this object, then the string is assigned with str.
oldChar | the old character. |
newChar | the new character. |
|
inline |
Returns a new string resulting from replacing all occurrences of a given substring with another substring.
Replacing subsequent occurrences picks up only after a given replacement. That is, replacing from "xa" to "xx" in "xaa" results in "xxa", not "xxx".
from | the substring to be replaced |
to | the replacing substring |
|
inline |
Returns a new string resulting from replacing n = count characters from position index in this string with newStr.
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 characters 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. |
|
inline |
Returns a new string resulting from replacing the first occurrence of a given substring with another substring.
from | the substring to be replaced | |
to | the replacing substring | |
[in,out] | index | pointer to a start index; if the pointer is non-null: upon entry to the function, its value is the index into the this string at which to start searching for the from substring, the value must be non-negative and not greater than this string's length; upon exit from the function its value is the index into this string at which the replacement took place or -1 if no replacement took place; if the pointer is null, searching always starts at index 0 |
|
inline |
Compares two strings in reverse order.
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.
str | the object to be compared. |
Check whether this string starts with a given substring.
str | the substring to be compared |
rest | if non-null, and this function returns true, then assign a copy of the remainder of this string to *rest. Available since LibreOffice 4.2 |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument.
|
inline |
Check whether this string starts with a given string, ignoring the case of ASCII letters.
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.
str | the substring to be compared |
rest | if non-null, and this function returns true, then assign a copy of the remainder of this string to *rest. |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument.
|
inline |
Converts from this string all ASCII uppercase characters (65-90) to ASCII lowercase characters (97-122).
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.
|
inline |
Converts from this string all ASCII lowercase characters (97-122) to ASCII uppercase characters (65-90).
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.
|
inline |
Returns the Boolean value from this string.
This function can't be used for language specific conversion.
|
inline |
Returns the first character from this string.
|
inline |
Returns the double value from this string.
This function can't be used for language specific conversion.
|
inline |
Returns the float value from this string.
This function can't be used for language specific conversion.
|
inline |
Returns the int32 value from this string.
This function can't be used for language specific conversion.
radix | the radix (between 2 and 36) |
|
inline |
Returns the int64 value from this string.
This function can't be used for language specific conversion.
radix | the radix (between 2 and 36) |
|
inline |
Returns the uint32 value from this string.
This function can't be used for language specific conversion.
radix | the radix (between 2 and 36) |
|
inline |
Returns the uint64 value from this string.
This function can't be used for language specific conversion.
radix | the radix (between 2 and 36) |
|
inline |
Returns a new string resulting from removing white space from both ends of the string.
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.
Returns the string representation of the sal_Bool argument.
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.
b | a sal_Bool. |
|
inlinestatic |
Returns the string representation of the char argument.
c | a character. |
|
inlinestatic |
Returns the string representation of the int argument.
This function can't be used for language specific conversion.
i | a int32. |
radix | the radix (between 2 and 36) |
|
inlinestatic |
Returns the string representation of the long argument.
This function can't be used for language specific conversion.
ll | a int64. |
radix | the radix (between 2 and 36) |
|
inlinestatic |
Returns the string representation of the float argument.
This function can't be used for language specific conversion.
f | a float. |
|
inlinestatic |
Returns the string representation of the double argument.
This function can't be used for language specific conversion.
d | a double. |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument.
|
friend |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function accepts an ASCII string literal as its argument.