20 #ifndef INCLUDED_RTL_USTRING_HXX 21 #define INCLUDED_RTL_USTRING_HXX 37 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 38 #include <config_global.h> 47 #ifdef RTL_STRING_UNITTEST 48 #define rtl rtlunittest 54 #ifdef RTL_STRING_UNITTEST 58 #if defined LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 72 explicit SAL_CONSTEXPR OUStringLiteral(
const char (&str)[ N ] ) : size( N - 1 ), data( str )
133 #ifndef _MSC_VER // TODO? 134 #if defined LIBO_INTERNAL_ONLY 183 #if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST_CONCAT 234 template<
typename T >
249 #ifdef RTL_STRING_UNITTEST 250 rtl_string_unittest_const_literal =
true;
254 #ifdef RTL_STRING_UNITTEST 259 template<
typename T >
264 rtl_string_unittest_invalid_conversion =
true;
270 template<
typename T >
275 rtl_string_unittest_invalid_conversion =
true;
279 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 296 OUString(OUStringLiteral literal): pData(NULL) {
323 throw std::bad_alloc();
344 sal_uInt32
const * codePoints, sal_Int32 codePointCount):
349 throw std::bad_alloc();
353 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 358 template<
typename T1,
typename T2 >
359 OUString(
const OUStringConcat< T1, T2 >& c )
361 const sal_Int32 l = c.length();
393 {
return *
reinterpret_cast< OUString const *
>( ppHandle ); }
406 #ifndef _MSC_VER // TODO? 407 #if defined LIBO_INTERNAL_ONLY 437 template<
typename T >
460 #if defined LIBO_INTERNAL_ONLY && HAVE_CXX11_REF_QUALIFIER 467 #if defined LIBO_INTERNAL_ONLY && HAVE_CXX11_REF_QUALIFIER 468 void operator+=(
OUString const &) && =
delete;
479 operator +=(T & literal)
480 #if defined LIBO_INTERNAL_ONLY && HAVE_CXX11_REF_QUALIFIER 492 #if defined LIBO_INTERNAL_ONLY && HAVE_CXX11_REF_QUALIFIER 495 operator +=(T &) && =
delete;
498 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 503 template<
typename T1,
typename T2 >
504 OUString& operator+=(
const OUStringConcat< T1, T2 >& c )
505 #if HAVE_CXX11_REF_QUALIFIER 509 sal_Int32 l = c.length();
514 sal_Unicode* end = c.addData( pData->buffer + pData->length );
519 #if HAVE_CXX11_REF_QUALIFIER 520 template<
typename T1,
typename T2>
void operator +=(
521 OUStringConcat<T1, T2>
const &) && =
delete;
554 return pData->length == 0;
577 assert(index >= 0 && static_cast<sal_uInt32>(index) < static_cast<sal_uInt32>(getLength()));
578 return getStr()[index];
596 str.pData->buffer, str.pData->length );
617 str.pData->buffer, str.pData->length, maxLength );
635 str.pData->buffer, str.pData->length );
643 template<
typename T >
649 pData->buffer, pData->length,
667 if ( pData->length != str.pData->length )
669 if ( pData == str.pData )
672 str.pData->buffer, str.pData->length ) == 0;
691 if ( pData->length != str.pData->length )
693 if ( pData == str.pData )
696 str.pData->buffer, str.pData->length ) == 0;
717 str.pData->buffer, str.pData->length );
726 template<
typename T >
735 pData->buffer, pData->length,
759 str.pData->buffer, str.pData->length, str.pData->length ) == 0;
767 template<
typename T >
774 pData->buffer+fromIndex, pData->length-fromIndex,
802 str.pData->buffer, str.pData->length,
803 str.pData->length ) == 0;
811 template<
typename T >
818 pData->buffer+fromIndex, pData->length-fromIndex,
869 "replace s1.compareToAscii(s2, strlen(s2)) == 0 with s1.startsWith(s2)")
870 sal_Int32 compareToAscii( const
sal_Char * asciiStr, sal_Int32 maxLength )
const 873 asciiStr, maxLength );
898 asciiStr, asciiStrLength );
941 if ( pData->length != asciiStrLength )
945 pData->buffer, asciiStr, asciiStrLength );
1016 if ( pData->length != asciiStrLength )
1046 asciiStr, asciiStrLength ) == 0;
1053 #if SAL_TYPES_SIZEOFLONG == 8 1084 asciiStr, asciiStrLength ) == 0;
1091 #if SAL_TYPES_SIZEOFLONG == 8 1111 bool b = match(str);
1112 if (b && rest != NULL) {
1123 template<
typename T >
1125 T & literal,
OUString * rest = NULL)
const 1131 <= sal_uInt32(pData->length))
1137 if (b && rest != NULL) {
1167 bool b = matchIgnoreAsciiCase(str);
1168 if (b && rest != NULL) {
1179 template<
typename T >
1193 if (b && rest != NULL) {
1216 && match(str, getLength() - str.
getLength());
1217 if (b && rest != NULL) {
1218 *rest = copy(0, getLength() - str.
getLength());
1228 template<
typename T >
1236 <= sal_uInt32(pData->length))
1238 (pData->buffer + pData->length
1243 if (b && rest != NULL) {
1266 return asciiStrLength <= pData->length
1268 pData->buffer + pData->length - asciiStrLength, asciiStr,
1295 && matchIgnoreAsciiCase(str, getLength() - str.
getLength());
1296 if (b && rest != NULL) {
1297 *rest = copy(0, getLength() - str.
getLength());
1307 template<
typename T >
1315 <= sal_uInt32(pData->length))
1317 (pData->buffer + pData->length
1324 if (b && rest != NULL) {
1344 char const * asciiStr, sal_Int32 asciiStrLength)
const 1346 return asciiStrLength <= pData->length
1348 pData->buffer + pData->length - asciiStrLength,
1349 asciiStrLength, asciiStr, asciiStrLength)
1354 {
return rStr1.
equals(rStr2); }
1356 {
return rStr1.
compareTo( pStr2 ) == 0; }
1368 {
return rStr1.
compareTo( rStr2 ) < 0; }
1370 {
return rStr1.
compareTo( rStr2 ) > 0; }
1372 {
return rStr1.
compareTo( rStr2 ) <= 0; }
1374 {
return rStr1.
compareTo( rStr2 ) >= 0; }
1383 template<
typename T >
1388 return string.equalsAsciiL(
1399 template<
typename T >
1404 return string.equalsAsciiL(
1415 template<
typename T >
1420 return !
string.equalsAsciiL(
1431 template<
typename T >
1436 return !
string.equalsAsciiL(
1441 #if defined LIBO_INTERNAL_ONLY 1460 lhs.pData->buffer, lhs.pData->length, rhs.data))
1464 friend bool operator <=(
OUString const & lhs, OUStringLiteral
const & rhs) {
1467 lhs.pData->buffer, lhs.pData->length, rhs.data))
1474 lhs.pData->buffer, lhs.pData->length, rhs.data))
1478 friend bool operator >=(
OUString const & lhs, OUStringLiteral
const & rhs) {
1481 lhs.pData->buffer, lhs.pData->length, rhs.data))
1496 rhs.pData->buffer, rhs.pData->length, lhs.data))
1500 friend bool operator <=(OUStringLiteral
const & lhs,
OUString const & rhs) {
1503 rhs.pData->buffer, rhs.pData->length, lhs.data))
1510 rhs.pData->buffer, rhs.pData->length, lhs.data))
1514 friend bool operator >=(OUStringLiteral
const & lhs,
OUString const & rhs) {
1517 rhs.pData->buffer, rhs.pData->length, lhs.data))
1552 return (ret < 0 ? ret : ret+fromIndex);
1604 str.pData->buffer, str.pData->length );
1605 return (ret < 0 ? ret : ret+fromIndex);
1613 template<
typename T >
1619 pData->buffer + fromIndex, pData->length - fromIndex,
1622 return n < 0 ? n : n + fromIndex;
1649 char const * str, sal_Int32 len, sal_Int32 fromIndex = 0)
const 1652 pData->buffer + fromIndex, pData->length - fromIndex, str, len);
1653 return ret < 0 ? ret : ret + fromIndex;
1660 #if SAL_TYPES_SIZEOFLONG == 8 1682 str.pData->buffer, str.pData->length );
1705 str.pData->buffer, str.pData->length );
1713 template<
typename T >
1719 pData->buffer, pData->length,
1746 pData->buffer, pData->length, str, len);
1761 rtl_uString *pNew = NULL;
1780 rtl_uString *pNew = NULL;
1795 rtl_uString* pNew = NULL;
1800 #ifndef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 1803 return rStr1.
concat( rStr2 );
1822 rtl_uString* pNew = NULL;
1842 rtl_uString* pNew = NULL;
1866 OUString const & from,
OUString const & to, sal_Int32 * index = NULL)
const 1868 rtl_uString * s = NULL;
1871 &s, pData, from.pData, to.pData, index == NULL ? &i : index);
1893 template<
typename T >
1895 sal_Int32 * index = NULL)
const 1898 rtl_uString * s = NULL;
1904 index == NULL ? &i : index);
1926 template<
typename T >
1928 sal_Int32 * index = NULL)
const 1931 rtl_uString * s = NULL;
1934 &s, pData, from.pData,
1937 index == NULL ? &i : index);
1959 template<
typename T1,
typename T2 >
1965 rtl_uString * s = NULL;
1973 index == NULL ? &i : index);
1995 rtl_uString * s = NULL;
2013 template<
typename T >
2017 rtl_uString * s = NULL;
2038 template<
typename T >
2042 rtl_uString * s = NULL;
2044 &s, pData, from.pData,
2063 template<
typename T1,
typename T2 >
2069 rtl_uString * s = NULL;
2091 rtl_uString* pNew = NULL;
2108 rtl_uString* pNew = NULL;
2126 rtl_uString* pNew = NULL;
2157 rtl_uString * pNew = NULL;
2177 return getToken(count, separator, n);
2201 return pData->buffer[0];
2312 rtl_uString * pNew = NULL;
2315 throw std::bad_alloc();
2348 sal_uInt32 *pInfo = NULL )
2350 rtl_uString * pNew = NULL;
2352 convertFlags, pInfo );
2354 throw std::bad_alloc();
2384 sal_uInt32 nFlags)
const 2387 pData->length, nEncoding, nFlags);
2442 sal_Int32 * indexUtf16, sal_Int32 incrementCodePoints = 1)
const 2445 pData, indexUtf16, incrementCodePoints);
2506 rtl_uString* pNewData = NULL;
2514 return number( static_cast< unsigned long long >( i ), radix );
2520 return number( static_cast< long long >( i ), radix );
2526 return number( static_cast< unsigned long long >( i ), radix );
2533 rtl_uString* pNewData = NULL;
2542 rtl_uString* pNewData = NULL;
2559 rtl_uString* pNewData = NULL;
2576 rtl_uString* pNewData = NULL;
2611 rtl_uString* pNewData = NULL;
2640 return number( i, radix );
2655 return number( ll, radix );
2703 rtl_uString* pNew = NULL;
2709 #if defined LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 2716 struct ToStringHelper< OUString >
2718 static int length(
const OUString& s ) {
return s.
getLength(); }
2720 static const bool allowOStringConcat =
false;
2721 static const bool allowOUStringConcat =
true;
2728 struct ToStringHelper< OUStringLiteral >
2730 static int length(
const OUStringLiteral& str ) {
return str.size; }
2731 static sal_Unicode* addData(
sal_Unicode* buffer,
const OUStringLiteral& str ) {
return addDataLiteral( buffer, str.data, str.size ); }
2732 static const bool allowOStringConcat =
false;
2733 static const bool allowOUStringConcat =
true;
2739 template<
typename charT,
typename traits,
typename T1,
typename T2 >
2740 inline std::basic_ostream<charT, traits> &
operator <<(
2741 std::basic_ostream<charT, traits> & stream,
const OUStringConcat< T1, T2 >& concat)
2743 return stream << OUString( concat );
2766 {
return (
size_t)rString.
hashCode(); }
2792 return OUString( rStr.
getStr(), rStr.
getLength(), encoding, convertFlags );
2829 template<
typename charT,
typename traits >
2831 std::basic_ostream<charT, traits> & stream, OUString
const &
string)
2841 #ifdef RTL_STRING_UNITTEST 2844 typedef rtlunittest::OUString
OUString;
2851 #if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST 2852 using ::rtl::OUString;
2853 using ::rtl::OUStringHash;
2856 using ::rtl::OUStringLiteral;
2857 using ::rtl::OUStringLiteral1;
sal_Int32 lastIndexOf(const OUString &str) const
Returns the index within this string of the last occurrence of the specified substring, searching backward starting at the end.
Definition: ustring.hxx:1679
SAL_DLLPUBLIC sal_Bool rtl_ustr_asciil_reverseEquals_WithLength(const sal_Unicode *first, const sal_Char *second, sal_Int32 len) SAL_THROW_EXTERN_C()
Compare two strings from back to front for equality.
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator!=(const OUString &string, T &literal)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1416
SAL_DLLPUBLIC void rtl_uString_newReplace(rtl_uString **newStr, rtl_uString *str, sal_Unicode oldChar, sal_Unicode newChar) SAL_THROW_EXTERN_C()
Create a new string by replacing all occurrences of a single character within another string...
#define OUSTRING_TO_OSTRING_CVTFLAGS
Definition: string.h:1324
SAL_DLLPUBLIC sal_uInt32 rtl_uString_iterateCodePoints(rtl_uString const *string, sal_Int32 *indexUtf16, sal_Int32 incrementCodePoints)
Iterate through a string based on code points instead of UTF-16 code units.
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 o...
Definition: ustring.hxx:812
SAL_DLLPUBLIC sal_Int32 rtl_ustr_ascii_shortenedCompareIgnoreAsciiCase_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Char *second, sal_Int32 shortenedLen) SAL_THROW_EXTERN_C()
Compare two strings with a maximum count of characters, ignoring the case of ASCII characters...
static OUString createFromAscii(const sal_Char *value)
Returns a OUString copied without conversion from an ASCII character string.
Definition: ustring.hxx:2701
SAL_DLLPUBLIC sal_Int32 rtl_ustr_indexOfStr_WithLength(const sal_Unicode *str, sal_Int32 len, const sal_Unicode *subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
Search for the first occurrence of a substring within a string.
sal_Int32 lastIndexOfAsciiL(char const *str, sal_Int32 len) const
Returns the index within this string of the last occurrence of the specified ASCII substring...
Definition: ustring.hxx:1743
sal_uInt16 rtl_TextEncoding
The various supported text encodings.
Definition: textenc.h:39
bool isEmpty() const
Checks if a string is empty.
Definition: ustring.hxx:552
static OUString number(unsigned long i, sal_Int16 radix=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: ustring.hxx:2524
bool equalsAscii(const sal_Char *asciiStr) const
Perform a comparison of two strings.
Definition: ustring.hxx:916
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator!=(T &literal, const OUString &string)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1432
#define RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
Definition: textcvt.h:64
SAL_DLLPUBLIC sal_Int32 rtl_ustr_lastIndexOfAscii_WithLength(sal_Unicode const *str, sal_Int32 len, char const *subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
Search for the last occurrence of an ASCII substring within a string.
SAL_DLLPUBLIC void rtl_uString_newReplaceAllAsciiLAsciiL(rtl_uString **newStr, rtl_uString *str, char const *from, sal_Int32 fromLength, char const *to, sal_Int32 toLength) SAL_THROW_EXTERN_C()
Create a new string by replacing all occurrences of a given substring with another substring...
SAL_DLLPUBLIC void rtl_uString_new(rtl_uString **newStr) SAL_THROW_EXTERN_C()
Allocate a new string containing no characters.
sal_Int32 toInt32(sal_Int16 radix=10) const
Returns the int32 value from this string.
Definition: ustring.hxx:2214
SAL_DLLPUBLIC sal_Bool rtl_ustr_toBoolean(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Interpret a string as a boolean.
SAL_DLLPUBLIC void rtl_uString_newReplaceFirst(rtl_uString **newStr, rtl_uString *str, rtl_uString const *from, rtl_uString const *to, sal_Int32 *index) SAL_THROW_EXTERN_C()
Create a new string by replacing the first occurrence of a given substring with another substring...
#define RTL_STR_MAX_VALUEOFUINT64
Definition: string.h:673
SAL_WARN_UNUSED_RESULT OUString copy(sal_Int32 beginIndex, sal_Int32 count) const
Returns a new string that is a substring of this string.
Definition: ustring.hxx:1778
SAL_DLLPUBLIC sal_Int32 rtl_ustr_hashCode_WithLength(const sal_Unicode *str, sal_Int32 len) SAL_THROW_EXTERN_C()
Return a hash code for a string.
libreoffice_internal::ConstCharArrayDetector< T, bool >::Type startsWithIgnoreAsciiCase(T &literal, OUString *rest=NULL) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: ustring.hxx:1181
Definition: stringutils.hxx:160
#define RTL_STR_MAX_VALUEOFINT64
Definition: string.h:650
SAL_DLLPUBLIC void rtl_string2UString(rtl_uString **newStr, const sal_Char *str, sal_Int32 len, rtl_TextEncoding encoding, sal_uInt32 convertFlags) SAL_THROW_EXTERN_C()
Create a new Unicode string by converting a byte string, using a specific text encoding.
bool matchIgnoreAsciiCaseAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength, sal_Int32 fromIndex=0) const
Match against a substring appearing in this string, ignoring the case of ASCII letters.
Definition: ustring.hxx:1081
void clear()
Clears the string, i.e, makes a zero-character string.
Definition: ustring.hxx:529
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfFloat(sal_Unicode *str, float f) SAL_THROW_EXTERN_C()
Create the string representation of a float.
OUString intern() const
Return a canonical representation for a string.
Definition: ustring.hxx:2310
SAL_DLLPUBLIC void rtl_uString_newFromSubString(rtl_uString **newStr, const rtl_uString *from, sal_Int32 beginIndex, sal_Int32 count) SAL_THROW_EXTERN_C()
Allocate a new string that is a substring of this string.
sal_Int32 compareToIgnoreAsciiCaseAscii(const sal_Char *asciiStr) const
Compares two ASCII strings ignoring case.
Definition: ustring.hxx:989
SAL_DLLPUBLIC void rtl_uString_newConcatAsciiL(rtl_uString **newString, rtl_uString *left, char const *right, sal_Int32 rightLength)
Create a new string that is the concatenation of two other strings.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_ascii_compareIgnoreAsciiCase_WithLengths(sal_Unicode const *first, sal_Int32 firstLen, char const *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings, ignoring the case of ASCII characters.
static OUString number(double d)
Returns the string representation of the double argument.
Definition: ustring.hxx:2573
SAL_DLLPUBLIC sal_Int32 rtl_ustr_indexOfAscii_WithLength(sal_Unicode const *str, sal_Int32 len, char const *subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
Search for the first occurrence of an ASCII substring within a string.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_ascii_compare_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Char *second) SAL_THROW_EXTERN_C()
Compare two strings.
static OUString number(unsigned long long ll, sal_Int16 radix=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: ustring.hxx:2539
OUString(rtl_uString *str)
New string from OUString data.
Definition: ustring.hxx:155
#define RTL_USTR_MAX_VALUEOFINT32
Definition: ustring.h:957
SAL_DLLPUBLIC double rtl_ustr_toDouble(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Interpret a string as a double.
sal_Int32 indexOf(const OUString &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.
Definition: ustring.hxx:1601
const sal_Char * getStr() const
Returns a pointer to the characters of this string.
Definition: string.hxx:430
bool convertToString(OString *pTarget, rtl_TextEncoding nEncoding, sal_uInt32 nFlags) const
Converts to an OString, signalling failure.
Definition: ustring.hxx:2383
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfInt32(sal_Unicode *str, sal_Int32 i, sal_Int16 radix) SAL_THROW_EXTERN_C()
Create the string representation of an integer.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_shortenedCompareIgnoreAsciiCase_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Unicode *second, sal_Int32 secondLen, sal_Int32 shortenedLen) SAL_THROW_EXTERN_C()
Compare two strings with a maximum count of characters, ignoring the case of ASCII characters...
double toDouble() const
Returns the double value from this string.
Definition: ustring.hxx:2289
bool toBoolean() const
Returns the Boolean value from this string.
Definition: ustring.hxx:2188
SAL_DLLPUBLIC sal_Int32 rtl_ustr_indexOfChar_WithLength(const sal_Unicode *str, sal_Int32 len, sal_Unicode ch) SAL_THROW_EXTERN_C()
Search for the first occurrence of a character within a string.
sal_Int32 hashCode() const
Returns a hashcode for this string.
Definition: ustring.hxx:1531
bool equals(const OUString &str) const
Perform a comparison of two strings.
Definition: ustring.hxx:665
libreoffice_internal::ConstCharArrayDetector< T, bool >::Type startsWith(T &literal, OUString *rest=NULL) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: ustring.hxx:1124
SAL_WARN_UNUSED_RESULT OUString replaceAll(OUString const &from, OUString const &to, sal_Int32 fromIndex=0) const
Returns a new string resulting from replacing all occurrences of a given substring with another subst...
Definition: ustring.hxx:1992
#define RTL_TEXTENCODING_UTF8
Definition: textenc.h:121
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 o...
Definition: ustring.hxx:768
#define RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR
Definition: textcvt.h:71
SAL_DLLPUBLIC void rtl_uString_newFromStr(rtl_uString **newStr, const sal_Unicode *value) SAL_THROW_EXTERN_C()
Allocate a new string that contains a copy of a character array.
#define SAL_DEPRECATED(message)
Use as follows: SAL_DEPRECATED("Don't use, it's evil.") void doit(int nPara);.
Definition: types.h:509
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:624
bool matchAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength, sal_Int32 fromIndex=0) const
Match against a substring appearing in this string.
Definition: ustring.hxx:1043
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfInt64(sal_Unicode *str, sal_Int64 l, sal_Int16 radix) SAL_THROW_EXTERN_C()
Create the string representation of a long integer.
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 o...
Definition: ustring.hxx:727
SAL_DLLPUBLIC sal_Int32 rtl_ustr_reverseCompare_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Unicode *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings from back to front.
#define RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR
Definition: textcvt.h:134
libreoffice_internal::ConstCharArrayDetector< T, sal_Int32 >::Type reverseCompareTo(T &literal) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: ustring.hxx:644
sal_Int32 compareTo(const OUString &str, sal_Int32 maxLength) const
Compares two strings with a maximum count of characters.
Definition: ustring.hxx:614
static OUString fromUtf8(const OString &rSource)
Convert an OString to an OUString, assuming that the OString is UTF-8-encoded.
Definition: ustring.hxx:2457
SAL_DLLPUBLIC void rtl_uString_newFromCodePoints(rtl_uString **newString, sal_uInt32 const *codePoints, sal_Int32 codePointCount) SAL_THROW_EXTERN_C()
Allocate a new string from an array of Unicode code points.
#define RTL_USTR_MAX_VALUEOFBOOLEAN
Definition: ustring.h:915
sal_Int32 indexOfAsciiL(char const *str, sal_Int32 len, sal_Int32 fromIndex=0) const
Returns the index within this string of the first occurrence of the specified ASCII substring...
Definition: ustring.hxx:1648
OUString(rtl_uString *str, __sal_NoAcquire)
New OUString from OUString data without acquiring it.
Definition: ustring.hxx:169
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfDouble(sal_Unicode *str, double d) SAL_THROW_EXTERN_C()
Create the string representation of a double.
static OUString number(float f)
Returns the string representation of the float argument.
Definition: ustring.hxx:2556
SAL_WARN_UNUSED_RESULT libreoffice_internal::ConstCharArrayDetector< T, OUString >::Type replaceAll(T &from, OUString const &to) const
Returns a new string resulting from replacing all occurrences of a given substring with another subst...
Definition: ustring.hxx:2014
bool equalsIgnoreAsciiCaseAscii(const sal_Char *asciiStr) const
Perform a ASCII lowercase comparison of two strings.
Definition: ustring.hxx:966
SAL_DLLPUBLIC sal_Int32 rtl_ustr_ascii_shortenedCompare_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Char *second, sal_Int32 shortenedLen) SAL_THROW_EXTERN_C()
Compare two strings with a maximum count of characters.
OUString(const OUString &str)
New string from OUString.
Definition: ustring.hxx:127
SAL_DLLPUBLIC void rtl_uString_newReplaceAllToAsciiL(rtl_uString **newStr, rtl_uString *str, rtl_uString const *from, char const *to, sal_Int32 toLength) SAL_THROW_EXTERN_C()
Create a new string by replacing all occurrences of a given substring with another substring...
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator==(const OUString &string, T &literal)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1384
This String class provide base functionality for C++ like 8-Bit character array handling.
Definition: string.hxx:90
SAL_WARN_UNUSED_RESULT OUString trim() const
Returns a new string resulting from removing white space from both ends of the string.
Definition: ustring.hxx:2124
sal_Int64 toInt64(sal_Int16 radix=10) const
Returns the int64 value from this string.
Definition: ustring.hxx:2246
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfUInt64(sal_Unicode *str, sal_uInt64 l, sal_Int16 radix) SAL_THROW_EXTERN_C()
Create the string representation of an unsigned long integer.
bool operator<(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:96
sal_uInt16 sal_Unicode
Definition: types.h:155
sal_Int32 compareTo(const OUString &str) const
Compares two strings.
Definition: ustring.hxx:593
bool matchIgnoreAsciiCase(const OUString &str, sal_Int32 fromIndex=0) const
Match against a substring appearing in this string, ignoring the case of ASCII letters.
Definition: ustring.hxx:799
bool equalsIgnoreAsciiCase(const OUString &str) const
Perform a ASCII lowercase comparison of two strings.
Definition: ustring.hxx:689
bool match(const OUString &str, sal_Int32 fromIndex=0) const
Match against a substring appearing in this string.
Definition: ustring.hxx:756
SAL_WARN_UNUSED_RESULT libreoffice_internal::ConstCharArrayDetector< T, OUString >::Type replaceFirst(OUString const &from, T &to, sal_Int32 *index=NULL) const
Returns a new string resulting from replacing the first occurrence of a given substring with another ...
Definition: ustring.hxx:1927
SAL_DLLPUBLIC void rtl_uString_intern(rtl_uString **newStr, rtl_uString *str) SAL_THROW_EXTERN_C()
Return a canonical representation for a string.
#define RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
Definition: textcvt.h:128
unsigned char sal_Bool
Definition: types.h:48
libreoffice_internal::ConstCharArrayDetector< T, sal_Int32 >::Type lastIndexOf(T &literal) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: ustring.hxx:1714
__sal_NoAcquire
Definition: types.h:384
sal_Int32 compareToIgnoreAsciiCase(const OUString &str) const
Perform a ASCII lowercase comparison of two strings.
Definition: ustring.hxx:714
static OUString number(int i, sal_Int16 radix=10)
Returns the string representation of the integer argument.
Definition: ustring.hxx:2503
bool startsWith(OUString const &str, OUString *rest=NULL) const
Check whether this string starts with a given substring.
Definition: ustring.hxx:1110
OUString getToken(sal_Int32 token, sal_Unicode cTok, sal_Int32 &index) const
Returns a token in the string.
Definition: ustring.hxx:2155
libreoffice_internal::ConstCharArrayDetector< T, OUString &>::Type operator=(T &literal)
Assign a new string from an 8-Bit string literal that is expected to contain only characters in the A...
Definition: ustring.hxx:438
#define RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
Definition: textcvt.h:68
SAL_DLLPUBLIC void rtl_uString_newToAsciiUpperCase(rtl_uString **newStr, rtl_uString *str) SAL_THROW_EXTERN_C()
Create a new string by converting all ASCII lowercase letters to uppercase within another string...
bool endsWithAsciiL(char const *asciiStr, sal_Int32 asciiStrLength) const
Check whether this string ends with a given ASCII string.
Definition: ustring.hxx:1263
bool equalsIgnoreAsciiCaseAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength) const
Perform an ASCII lowercase comparison of two strings.
Definition: ustring.hxx:1014
SAL_WARN_UNUSED_RESULT OUString toAsciiLowerCase() const
Converts from this string all ASCII uppercase characters (65-90) to ASCII lowercase characters (97-12...
Definition: ustring.hxx:2089
sal_Int32 compareToAscii(const sal_Char *asciiStr) const
Compares two strings.
Definition: ustring.hxx:841
static OUString boolean(bool b)
Returns the string representation of the boolean argument.
Definition: ustring.hxx:2608
SAL_DLLPUBLIC sal_Int32 rtl_ustr_lastIndexOfChar_WithLength(const sal_Unicode *str, sal_Int32 len, sal_Unicode ch) SAL_THROW_EXTERN_C()
Search for the last occurrence of a character within a string.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_compare_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Unicode *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings.
static OUString number(long i, sal_Int16 radix=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: ustring.hxx:2518
SAL_WARN_UNUSED_RESULT libreoffice_internal::ConstCharArrayDetector< T, OUString >::Type replaceAll(OUString const &from, T &to) const
Returns a new string resulting from replacing all occurrences of a given substring with another subst...
Definition: ustring.hxx:2039
OUString(sal_uInt32 const *codePoints, sal_Int32 codePointCount)
Create a new string from an array of Unicode code points.
Definition: ustring.hxx:343
SAL_WARN_UNUSED_RESULT OUString replaceAt(sal_Int32 index, sal_Int32 count, const OUString &newStr) const
Returns a new string resulting from replacing n = count characters from position index in this string...
Definition: ustring.hxx:1820
OUString(const sal_Unicode *value, sal_Int32 length)
New string from a Unicode character buffer array.
Definition: ustring.hxx:213
sal_Int32 reverseCompareTo(const OUString &str) const
Compares two strings in reverse order.
Definition: ustring.hxx:632
bool operator==(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:116
OUString & operator=(const OUString &str)
Assign a new string.
Definition: ustring.hxx:400
OString OUStringToOString(const OUString &rUnicode, rtl_TextEncoding encoding, sal_uInt32 convertFlags=OUSTRING_TO_OSTRING_CVTFLAGS)
Convert an OUString to an OString, using a specific text encoding.
Definition: ustring.hxx:2812
SAL_DLLPUBLIC sal_Int32 rtl_ustr_compareIgnoreAsciiCase_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Unicode *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings, ignoring the case of ASCII characters.
SAL_DLLPUBLIC void rtl_uString_newReplaceAllFromIndex(rtl_uString **newStr, rtl_uString *str, rtl_uString const *from, rtl_uString const *to, sal_Int32 fromIndex) SAL_THROW_EXTERN_C()
Create a new string by replacing all occurrences of a given substring with another substring...
OUString(T &literal, typename libreoffice_internal::ConstCharArrayDetector< T, libreoffice_internal::Dummy >::Type=libreoffice_internal::Dummy())
New string from an 8-Bit string literal that is expected to contain only characters in the ASCII set ...
Definition: ustring.hxx:235
sal_Int32 lastIndexOf(sal_Unicode 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.
Definition: ustring.hxx:1581
bool endsWithIgnoreAsciiCaseAsciiL(char const *asciiStr, sal_Int32 asciiStrLength) const
Check whether this string ends with a given ASCII string, ignoring the case of ASCII letters...
Definition: ustring.hxx:1343
sal_Int32 lastIndexOf(const OUString &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.
Definition: ustring.hxx:1702
SAL_WARN_UNUSED_RESULT libreoffice_internal::ConstCharArrayDetector< T1, typename libreoffice_internal::ConstCharArrayDetector< T2, OUString >::Type >::Type replaceFirst(T1 &from, T2 &to, sal_Int32 *index=NULL) const
Returns a new string resulting from replacing the first occurrence of a given substring with another ...
Definition: ustring.hxx:1961
bool operator!=(const Any &rAny, const C &value)
Template unequality operator: compares set value of left side any to right side value.
Definition: Any.hxx:573
definition of a no acquire enum for ctors
Definition: types.h:388
SAL_DLLPUBLIC sal_Int32 rtl_ustr_asciil_reverseCompare_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Char *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings from back to front.
size_t operator()(const OUString &rString) const
Compute a hash code for a string.
Definition: ustring.hxx:2765
SAL_DLLPUBLIC void rtl_uString_newTrim(rtl_uString **newStr, rtl_uString *str) SAL_THROW_EXTERN_C()
Create a new string by removing white space from both ends of another string.
SAL_DLLPUBLIC void rtl_uString_newToAsciiLowerCase(rtl_uString **newStr, rtl_uString *str) SAL_THROW_EXTERN_C()
Create a new string by converting all ASCII uppercase letters to lowercase within another string...
SAL_WARN_UNUSED_RESULT libreoffice_internal::ConstCharArrayDetector< T1, typename libreoffice_internal::ConstCharArrayDetector< T2, OUString >::Type >::Type replaceAll(T1 &from, T2 &to) const
Returns a new string resulting from replacing all occurrences of a given substring with another subst...
Definition: ustring.hxx:2065
bool endsWithIgnoreAsciiCase(OUString const &str, OUString *rest=NULL) const
Check whether this string ends with a given string, ignoring the case of ASCII letters.
Definition: ustring.hxx:1292
bool endsWith(OUString const &str, OUString *rest=NULL) const
Check whether this string ends with a given substring.
Definition: ustring.hxx:1214
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfBoolean(sal_Unicode *str, sal_Bool b) SAL_THROW_EXTERN_C()
Create the string representation of a boolean.
libreoffice_internal::ConstCharArrayDetector< T, bool >::Type endsWith(T &literal, OUString *rest=NULL) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: ustring.hxx:1230
SAL_DLLPUBLIC void rtl_uString_newReplaceFirstToAsciiL(rtl_uString **newStr, rtl_uString *str, rtl_uString const *from, char const *to, sal_Int32 toLength, sal_Int32 *index) SAL_THROW_EXTERN_C()
Create a new string by replacing the first occurrence of a given substring with another substring...
SAL_DLLPUBLIC sal_Int32 rtl_ustr_shortenedCompare_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Unicode *second, sal_Int32 secondLen, sal_Int32 shortenedLen) SAL_THROW_EXTERN_C()
Compare two strings with a maximum count of characters.
sal_uInt64 toUInt64(sal_Int16 radix=10) const
Returns the uint64 value from this string.
Definition: ustring.hxx:2263
float toFloat() const
Returns the float value from this string.
Definition: ustring.hxx:2276
This String class provides base functionality for C++ like Unicode character array handling...
Definition: ustring.hxx:106
SAL_WARN_UNUSED_RESULT OUString copy(sal_Int32 beginIndex) const
Returns a new string that is a substring of this string.
Definition: ustring.hxx:1759
OUString(const sal_Char *value, sal_Int32 length, rtl_TextEncoding encoding, sal_uInt32 convertFlags=OSTRING_TO_OUSTRING_CVTFLAGS)
New string from an 8-Bit character buffer array.
Definition: ustring.hxx:316
SAL_DLLPUBLIC sal_Int32 rtl_ustr_lastIndexOfStr_WithLength(const sal_Unicode *str, sal_Int32 len, const sal_Unicode *subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
Search for the last occurrence of a substring within a string.
SAL_DLLPUBLIC sal_Bool rtl_convertStringToUString(rtl_uString **target, char const *source, sal_Int32 length, rtl_TextEncoding encoding, sal_uInt32 flags) SAL_THROW_EXTERN_C()
Converts a byte string to a Unicode string, signalling failure.
SAL_WARN_UNUSED_RESULT OUString replace(sal_Unicode oldChar, sal_Unicode newChar) const
Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar...
Definition: ustring.hxx:1840
static OUString intern(const sal_Char *value, sal_Int32 length, rtl_TextEncoding encoding, sal_uInt32 convertFlags=OSTRING_TO_OUSTRING_CVTFLAGS, sal_uInt32 *pInfo=NULL)
Return a canonical representation for a converted string.
Definition: ustring.hxx:2345
sal_Int32 reverseCompareToAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength) const
Compares two strings in reverse order.
Definition: ustring.hxx:895
#define SAL_CONSTEXPR
C++11 "constexpr" feature.
Definition: types.h:445
#define SAL_WARN_UNUSED_RESULT
Use this as markup for functions and methods whose return value must be checked.
Definition: types.h:325
char sal_Char
A legacy synonym for char.
Definition: types.h:130
OUString & operator+=(const OUString &str)
Append a string to this string.
Definition: ustring.hxx:459
OUString OStringToOUString(const OString &rStr, rtl_TextEncoding encoding, sal_uInt32 convertFlags=OSTRING_TO_OUSTRING_CVTFLAGS)
Convert an OString to an OUString, using a specific text encoding.
Definition: ustring.hxx:2788
#define RTL_USTR_MAX_VALUEOFFLOAT
Definition: ustring.h:1022
SAL_DLLPUBLIC void rtl_uString_newFromLiteral(rtl_uString **newStr, const sal_Char *value, sal_Int32 len, sal_Int32 allocExtra) SAL_THROW_EXTERN_C()
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 o...
Definition: ustring.hxx:1614
bool operator>(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:106
SAL_DLLPUBLIC void rtl_uString_newReplaceFirstAsciiLAsciiL(rtl_uString **newStr, rtl_uString *str, char const *from, sal_Int32 fromLength, char const *to, sal_Int32 toLength, sal_Int32 *index) SAL_THROW_EXTERN_C()
Create a new string by replacing the first occurrence of a given substring with another substring...
SAL_WARN_UNUSED_RESULT libreoffice_internal::ConstCharArrayDetector< T, OUString >::Type replaceFirst(T &from, OUString const &to, sal_Int32 *index=NULL) const
Returns a new string resulting from replacing the first occurrence of a given substring with another ...
Definition: ustring.hxx:1894
SAL_WARN_UNUSED_RESULT OUString replaceFirst(OUString const &from, OUString const &to, sal_Int32 *index=NULL) const
Returns a new string resulting from replacing the first occurrence of a given substring with another ...
Definition: ustring.hxx:1865
SAL_WARN_UNUSED_RESULT OUString toAsciiUpperCase() const
Converts from this string all ASCII lowercase characters (97-122) to ASCII uppercase characters (65-9...
Definition: ustring.hxx:2106
OUString getToken(sal_Int32 count, sal_Unicode separator) const
Returns a token from the string.
Definition: ustring.hxx:2175
OUString(sal_Unicode value)
New string from a single Unicode character.
Definition: ustring.hxx:177
#define RTL_USTR_MAX_VALUEOFDOUBLE
Definition: ustring.h:1041
SAL_DLLPUBLIC void rtl_uString_newReplaceStrAt(rtl_uString **newStr, rtl_uString *str, sal_Int32 idx, sal_Int32 count, rtl_uString *subStr) SAL_THROW_EXTERN_C()
Create a new string by replacing a substring of another string.
sal_Unicode toChar() const
Returns the first character from this string.
Definition: ustring.hxx:2199
SAL_DLLPUBLIC sal_uInt32 rtl_ustr_toUInt32(const sal_Unicode *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an unsigned integer.
Definition: stringutils.hxx:117
OUString(const sal_Unicode *value)
New string from a Unicode character buffer array.
Definition: ustring.hxx:199
SAL_DLLPUBLIC void rtl_uString_newFromAscii(rtl_uString **newStr, const sal_Char *value) SAL_THROW_EXTERN_C()
Allocate a new string that contains a copy of a character array.
const sal_Unicode * getStr() const
Returns a pointer to the Unicode character buffer for this string.
Definition: ustring.hxx:564
bool equalsAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength) const
Perform a comparison of two strings.
Definition: ustring.hxx:939
SAL_DLLPUBLIC void rtl_uString_internConvert(rtl_uString **newStr, const sal_Char *str, sal_Int32 len, rtl_TextEncoding encoding, sal_uInt32 convertFlags, sal_uInt32 *pInfo) SAL_THROW_EXTERN_C()
Return a canonical representation for a string.
sal_Int32 indexOf(sal_Unicode 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.
Definition: ustring.hxx:1549
SAL_DLLPUBLIC void rtl_uString_newReplaceAllAsciiL(rtl_uString **newStr, rtl_uString *str, char const *from, sal_Int32 fromLength, rtl_uString const *to) SAL_THROW_EXTERN_C()
Create a new string by replacing all occurrences of a given substring with another substring...
SAL_DLLPUBLIC void rtl_uString_newFromStr_WithLength(rtl_uString **newStr, const sal_Unicode *value, sal_Int32 len) SAL_THROW_EXTERN_C()
Allocate a new string that contains a copy of a character array.
sal_Int32 lastIndexOf(sal_Unicode ch) const
Returns the index within this string of the last occurrence of the specified character, searching backward starting at the end.
Definition: ustring.hxx:1564
SAL_DLLPUBLIC sal_Int32 rtl_ustr_ascii_compareIgnoreAsciiCase_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Char *second) SAL_THROW_EXTERN_C()
Compare two strings, ignoring the case of ASCII characters.
SAL_DLLPUBLIC void rtl_uString_newConcat(rtl_uString **newStr, rtl_uString *left, rtl_uString *right) SAL_THROW_EXTERN_C()
Create a new string that is the concatenation of two other strings.
sal_Int32 getLength() const
Returns the length of this string.
Definition: string.hxx:404
static OUString const & unacquired(rtl_uString *const *ppHandle)
Provides an OUString const & passing a storage pointer of an rtl_uString * handle.
Definition: ustring.hxx:392
Definition: bootstrap.hxx:29
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator==(T &literal, const OUString &string)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1400
SAL_WARN_UNUSED_RESULT OUString concat(const OUString &str) const
Concatenates the specified string to the end of this string.
Definition: ustring.hxx:1793
bool startsWithIgnoreAsciiCase(OUString const &str, OUString *rest=NULL) const
Check whether this string starts with a given string, ignoring the case of ASCII letters.
Definition: ustring.hxx:1164
friend OUString operator+(const OUString &rStr1, const OUString &rStr2)
Definition: ustring.hxx:1801
SAL_DLLPUBLIC sal_uInt64 rtl_ustr_toUInt64(const sal_Unicode *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an unsigned long integer.
SAL_DLLPUBLIC void rtl_uString_release(rtl_uString *str) SAL_THROW_EXTERN_C() SAL_HOT
Decrement the reference count of a string.
OUString()
New string containing no characters.
Definition: ustring.hxx:116
sal_uInt32 iterateCodePoints(sal_Int32 *indexUtf16, sal_Int32 incrementCodePoints=1) const
Iterate through this string based on code points instead of UTF-16 code units.
Definition: ustring.hxx:2441
sal_Int32 getLength() const
Returns the length of this string.
Definition: ustring.hxx:542
SAL_DLLPUBLIC sal_Int32 rtl_ustr_toInt32(const sal_Unicode *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an integer.
static OUString number(unsigned int i, sal_Int16 radix=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: ustring.hxx:2512
#define OSTRING_TO_OUSTRING_CVTFLAGS
Definition: ustring.h:1894
sal_uInt32 toUInt32(sal_Int16 radix=10) const
Returns the uint32 value from this string.
Definition: ustring.hxx:2231
SAL_DLLPUBLIC void rtl_uString_ensureCapacity(rtl_uString **str, sal_Int32 size) SAL_THROW_EXTERN_C()
Ensure a string has enough space for a given number of characters.
static OUString number(long long ll, sal_Int16 radix=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: ustring.hxx:2530
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &stream, OString const &string)
Support for rtl::OString in std::ostream (and thus in CPPUNIT_ASSERT or SAL_INFO macros, for example).
Definition: string.hxx:1894
SAL_DLLPUBLIC rtl_uString * rtl_uString_alloc(sal_Int32 nLen) SAL_THROW_EXTERN_C()
Allocate a new string containing space for a given number of characters.
SAL_DLLPUBLIC void rtl_uString_assign(rtl_uString **str, rtl_uString *rightValue) SAL_THROW_EXTERN_C()
Assign a new value to a string.
SAL_DLLPUBLIC float rtl_ustr_toFloat(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Interpret a string as a float.
A helper to use OUStrings with hash maps.
Definition: ustring.hxx:2754
SAL_DLLPUBLIC void rtl_uString_newReplaceFirstAsciiL(rtl_uString **newStr, rtl_uString *str, char const *from, sal_Int32 fromLength, rtl_uString const *to, sal_Int32 *index) SAL_THROW_EXTERN_C()
Create a new string by replacing the first occurrence of a given substring with another substring...
SAL_DLLPUBLIC void rtl_uString_acquire(rtl_uString *str) SAL_THROW_EXTERN_C() SAL_HOT
Increment the reference count of a string.
libreoffice_internal::ConstCharArrayDetector< T, bool >::Type endsWithIgnoreAsciiCase(T &literal, OUString *rest=NULL) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: ustring.hxx:1309
~OUString()
Release the string data.
Definition: ustring.hxx:376
OString toUtf8() const
Convert this string to an OString, assuming that the string can be UTF-8-encoded successfully.
Definition: ustring.hxx:2480
SAL_DLLPUBLIC sal_Int32 rtl_uString_getToken(rtl_uString **newStr, rtl_uString *str, sal_Int32 token, sal_Unicode cTok, sal_Int32 idx) SAL_THROW_EXTERN_C()
Create a new string by extracting a single token from another string.
SAL_DLLPUBLIC sal_Bool rtl_convertUStringToString(rtl_String **pTarget, sal_Unicode const *pSource, sal_Int32 nLength, rtl_TextEncoding nEncoding, sal_uInt32 nFlags) SAL_THROW_EXTERN_C()
Converts a Unicode string to a byte string, signalling failure.
SAL_DLLPUBLIC sal_Int64 rtl_ustr_toInt64(const sal_Unicode *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as a long integer.