LibreOffice
LibreOffice 6.2 SDK C/C++ API Reference
|
Go to the documentation of this file.
20 #ifndef INCLUDED_RTL_USTRING_HXX
21 #define INCLUDED_RTL_USTRING_HXX
35 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
36 #include "config_global.h"
40 #ifdef RTL_STRING_UNITTEST
41 extern bool rtl_string_unittest_invalid_conversion;
49 #ifdef RTL_STRING_UNITTEST
50 #define rtl rtlunittest
58 #ifdef RTL_STRING_UNITTEST
62 #if defined LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
73 template<
typename T> constexpr OUStringLiteral(
75 typename libreoffice_internal::ConstCharArrayDetector<
76 T, libreoffice_internal::Dummy>::Type
77 = libreoffice_internal::Dummy()):
78 size(libreoffice_internal::ConstCharArrayDetector<T>::length),
80 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(literal))
82 #if HAVE_CXX14_CONSTEXPR
84 libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal));
92 constexpr sal_Int32 getLength()
const {
return size; }
150 #ifndef _MSC_VER // TODO?
151 #if defined LIBO_INTERNAL_ONLY
200 #if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST_CONCAT
251 template<
typename T >
266 #ifdef RTL_STRING_UNITTEST
267 rtl_string_unittest_const_literal =
true;
271 #if defined LIBO_INTERNAL_ONLY
285 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(
287 libreoffice_internal::ConstCharArrayDetector<T>::length);
292 #ifdef RTL_STRING_UNITTEST
297 template<
typename T >
302 rtl_string_unittest_invalid_conversion =
true;
308 template<
typename T >
313 rtl_string_unittest_invalid_conversion =
true;
317 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
334 OUString(OUStringLiteral literal): pData(NULL) {
361 throw std::bad_alloc();
382 sal_uInt32
const * codePoints, sal_Int32 codePointCount):
387 throw std::bad_alloc();
391 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
396 template<
typename T1,
typename T2 >
397 OUString( OUStringConcat< T1, T2 >&& c )
399 const sal_Int32 l = c.length();
431 {
return *
reinterpret_cast< OUString const *
>( ppHandle ); }
444 #ifndef _MSC_VER // TODO?
445 #if defined LIBO_INTERNAL_ONLY
475 template<
typename T >
492 #if defined LIBO_INTERNAL_ONLY
497 operator =(T & literal) {
503 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(
505 libreoffice_internal::ConstCharArrayDetector<T>::length);
511 OUString & operator =(OUStringLiteral
const & literal) {
512 if (literal.size == 0) {
521 #if defined LIBO_INTERNAL_ONLY
530 inline OUString & operator+=(
const OUStringBuffer & str ) &;
541 #if defined LIBO_INTERNAL_ONLY
545 return internalAppend(str.pData);
547 #if defined LIBO_INTERNAL_ONLY
548 void operator+=(
OUString const &) && =
delete;
559 operator +=(T & literal)
560 #if defined LIBO_INTERNAL_ONLY
572 #if defined LIBO_INTERNAL_ONLY
575 operator +=(T &) && =
delete;
578 #if defined LIBO_INTERNAL_ONLY
583 operator +=(T & literal) & {
592 libreoffice_internal::ConstCharArrayDetector<T, OUString &>::TypeUtf16
593 operator +=(T &) && =
delete;
596 OUString & operator +=(OUStringLiteral
const & literal) & {
600 void operator +=(OUStringLiteral
const &) && =
delete;
603 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
608 template<
typename T1,
typename T2 >
609 OUString& operator+=( OUStringConcat< T1, T2 >&& c ) & {
610 sal_Int32 l = c.length();
615 sal_Unicode* end = c.addData( pData->buffer + pData->length );
620 template<
typename T1,
typename T2>
void operator +=(
621 OUStringConcat<T1, T2> &&) && =
delete;
653 return pData->length == 0;
676 assert(index >= 0 &&
static_cast<sal_uInt32
>(index) <
static_cast<sal_uInt32
>(getLength()));
677 return getStr()[index];
695 str.pData->buffer, str.pData->length );
716 str.pData->buffer, str.pData->length, maxLength );
734 str.pData->buffer, str.pData->length );
742 template<
typename T >
748 pData->buffer, pData->length,
753 #if defined LIBO_INTERNAL_ONLY
758 reverseCompareTo(T & literal)
const {
760 pData->buffer, pData->length,
766 sal_Int32 reverseCompareTo(OUStringLiteral
const & literal)
const {
768 pData->buffer, pData->length, literal.data, literal.size);
785 if ( pData->length != str.pData->length )
787 if ( pData == str.pData )
790 str.pData->buffer, str.pData->length ) == 0;
809 if ( pData->length != str.pData->length )
811 if ( pData == str.pData )
814 str.pData->buffer, str.pData->length ) == 0;
835 str.pData->buffer, str.pData->length );
844 template<
typename T >
853 pData->buffer, pData->length,
859 #if defined LIBO_INTERNAL_ONLY
863 equalsIgnoreAsciiCase(T & literal)
const {
866 pData->buffer, pData->length,
874 bool equalsIgnoreAsciiCase(OUStringLiteral
const & literal)
const {
875 return pData->length == literal.size
877 pData->buffer, pData->length, literal.data)
900 str.pData->buffer, str.pData->length, str.pData->length ) == 0;
908 template<
typename T >
915 pData->buffer+fromIndex, pData->length-fromIndex,
922 #if defined LIBO_INTERNAL_ONLY
926 match(T & literal, sal_Int32 fromIndex = 0)
const {
927 assert(fromIndex >= 0);
930 pData->buffer + fromIndex, pData->length - fromIndex,
939 bool match(OUStringLiteral
const & literal, sal_Int32 fromIndex = 0)
const {
942 pData->buffer + fromIndex, pData->length - fromIndex,
943 literal.data, literal.size)
969 str.pData->buffer, str.pData->length,
970 str.pData->length ) == 0;
978 template<
typename T >
985 pData->buffer+fromIndex, pData->length-fromIndex,
992 #if defined LIBO_INTERNAL_ONLY
996 matchIgnoreAsciiCase(T & literal, sal_Int32 fromIndex = 0)
const {
997 assert(fromIndex >= 0);
1000 pData->buffer + fromIndex, pData->length - fromIndex,
1009 bool matchIgnoreAsciiCase(
1010 OUStringLiteral
const & literal, sal_Int32 fromIndex = 0)
const
1014 pData->buffer+fromIndex, pData->length-fromIndex, literal.data,
1064 "replace s1.compareToAscii(s2, strlen(s2)) == 0 with s1.startsWith(s2)")
1065 sal_Int32 compareToAscii( const
sal_Char * asciiStr, sal_Int32 maxLength )
const
1068 asciiStr, maxLength );
1093 asciiStr, asciiStrLength );
1136 if ( pData->length != asciiStrLength )
1140 pData->buffer, asciiStr, asciiStrLength );
1211 if ( pData->length != asciiStrLength )
1241 asciiStr, asciiStrLength ) == 0;
1248 #if SAL_TYPES_SIZEOFLONG == 8
1279 asciiStr, asciiStrLength ) == 0;
1286 #if SAL_TYPES_SIZEOFLONG == 8
1306 bool b = match(str);
1307 if (b && rest != NULL) {
1318 template<
typename T >
1320 T & literal,
OUString * rest = NULL)
const
1326 <= sal_uInt32(pData->length))
1332 if (b && rest != NULL) {
1339 #if defined LIBO_INTERNAL_ONLY
1341 template<
typename T>
1343 startsWith(T & literal,
OUString * rest =
nullptr)
const {
1346 <= sal_uInt32(pData->length))
1354 if (b && rest !=
nullptr) {
1362 bool startsWith(OUStringLiteral
const & literal, OUString * rest =
nullptr)
1365 bool b = literal.size <= pData->length
1367 pData->buffer, literal.data, literal.size);
1368 if (b && rest !=
nullptr) {
1369 *rest = copy(literal.size);
1398 bool b = matchIgnoreAsciiCase(str);
1399 if (b && rest != NULL) {
1410 template<
typename T >
1424 if (b && rest != NULL) {
1431 #if defined LIBO_INTERNAL_ONLY
1433 template<
typename T>
1435 startsWithIgnoreAsciiCase(T & literal,
OUString * rest =
nullptr)
const {
1438 <= sal_uInt32(pData->length))
1446 if (b && rest !=
nullptr) {
1454 bool startsWithIgnoreAsciiCase(
1455 OUStringLiteral
const & literal, OUString * rest =
nullptr)
const
1459 pData->buffer, literal.size, literal.data, literal.size)
1461 if (b && rest !=
nullptr) {
1462 *rest = copy(literal.size);
1484 && match(str, getLength() - str.
getLength());
1485 if (b && rest != NULL) {
1486 *rest = copy(0, getLength() - str.
getLength());
1496 template<
typename T >
1504 <= sal_uInt32(pData->length))
1506 (pData->buffer + pData->length
1511 if (b && rest != NULL) {
1520 #if defined LIBO_INTERNAL_ONLY
1522 template<
typename T>
1524 endsWith(T & literal,
OUString * rest =
nullptr)
const {
1527 <= sal_uInt32(pData->length))
1529 (pData->buffer + pData->length
1536 if (b && rest !=
nullptr) {
1546 bool endsWith(OUStringLiteral
const & literal, OUString * rest =
nullptr)
1549 bool b = literal.size <= pData->length
1551 pData->buffer + pData->length - literal.size,
1552 literal.data, literal.size);
1553 if (b && rest !=
nullptr) {
1554 *rest = copy(0, (getLength() - literal.size));
1574 return asciiStrLength <= pData->length
1576 pData->buffer + pData->length - asciiStrLength, asciiStr,
1603 && matchIgnoreAsciiCase(str, getLength() - str.
getLength());
1604 if (b && rest != NULL) {
1605 *rest = copy(0, getLength() - str.
getLength());
1615 template<
typename T >
1623 <= sal_uInt32(pData->length))
1625 (pData->buffer + pData->length
1632 if (b && rest != NULL) {
1641 #if defined LIBO_INTERNAL_ONLY
1643 template<
typename T>
1645 endsWithIgnoreAsciiCase(T & literal,
OUString * rest =
nullptr)
const {
1648 <= sal_uInt32(pData->length))
1650 (pData->buffer + pData->length
1657 if (b && rest !=
nullptr) {
1667 bool endsWithIgnoreAsciiCase(
1668 OUStringLiteral
const & literal, OUString * rest =
nullptr)
const
1670 bool b = literal.size <= pData->length
1672 pData->buffer + pData->length - literal.size,
1673 literal.size, literal.data, literal.size)
1675 if (b && rest !=
nullptr) {
1676 *rest = copy(0, getLength() - literal.size);
1693 char const * asciiStr, sal_Int32 asciiStrLength)
const
1695 return asciiStrLength <= pData->length
1697 pData->buffer + pData->length - asciiStrLength,
1698 asciiStrLength, asciiStr, asciiStrLength)
1703 {
return rStr1.
equals(rStr2); }
1705 {
return rStr1.
compareTo( pStr2 ) == 0; }
1717 {
return rStr1.
compareTo( rStr2 ) < 0; }
1719 {
return rStr1.
compareTo( rStr2 ) > 0; }
1721 {
return rStr1.
compareTo( rStr2 ) <= 0; }
1723 {
return rStr1.
compareTo( rStr2 ) >= 0; }
1732 template<
typename T >
1748 template<
typename T >
1764 template<
typename T >
1780 template<
typename T >
1790 #if defined LIBO_INTERNAL_ONLY
1796 string.pData->buffer,
string.pData->length,
1803 template<
typename T>
friend typename libreoffice_internal::ConstCharArrayDetector<T, bool>::TypeUtf16
1807 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(
1809 libreoffice_internal::ConstCharArrayDetector<T>::length,
1810 string.pData->buffer,
string.pData->length)
1814 template<
typename T>
friend typename libreoffice_internal::ConstCharArrayDetector<T, bool>::TypeUtf16
1818 string.pData->buffer,
string.pData->length,
1819 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(
1821 libreoffice_internal::ConstCharArrayDetector<T>::length)
1825 template<
typename T>
friend typename libreoffice_internal::ConstCharArrayDetector<T, bool>::TypeUtf16
1829 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(
1831 libreoffice_internal::ConstCharArrayDetector<T>::length,
1832 string.pData->buffer,
string.pData->length)
1837 #if defined LIBO_INTERNAL_ONLY
1845 friend bool operator ==(OUString
const & lhs, OUStringLiteral
const & rhs) {
1846 return lhs.equalsAsciiL(rhs.data, rhs.size);
1849 friend bool operator !=(OUString
const & lhs, OUStringLiteral
const & rhs) {
1850 return !lhs.equalsAsciiL(rhs.data, rhs.size);
1853 friend bool operator <(OUString
const & lhs, OUStringLiteral
const & rhs) {
1856 lhs.pData->buffer, lhs.pData->length, rhs.data))
1860 friend bool operator <=(OUString
const & lhs, OUStringLiteral
const & rhs) {
1863 lhs.pData->buffer, lhs.pData->length, rhs.data))
1867 friend bool operator >(OUString
const & lhs, OUStringLiteral
const & rhs) {
1870 lhs.pData->buffer, lhs.pData->length, rhs.data))
1874 friend bool operator >=(OUString
const & lhs, OUStringLiteral
const & rhs) {
1877 lhs.pData->buffer, lhs.pData->length, rhs.data))
1881 friend bool operator ==(OUStringLiteral
const & lhs, OUString
const & rhs) {
1882 return rhs.equalsAsciiL(lhs.data, lhs.size);
1885 friend bool operator !=(OUStringLiteral
const & lhs, OUString
const & rhs) {
1886 return !rhs.equalsAsciiL(lhs.data, lhs.size);
1889 friend bool operator <(OUStringLiteral
const & lhs, OUString
const & rhs) {
1892 rhs.pData->buffer, rhs.pData->length, lhs.data))
1896 friend bool operator <=(OUStringLiteral
const & lhs, OUString
const & rhs) {
1899 rhs.pData->buffer, rhs.pData->length, lhs.data))
1903 friend bool operator >(OUStringLiteral
const & lhs, OUString
const & rhs) {
1906 rhs.pData->buffer, rhs.pData->length, lhs.data))
1910 friend bool operator >=(OUStringLiteral
const & lhs, OUString
const & rhs) {
1913 rhs.pData->buffer, rhs.pData->length, lhs.data))
1948 return (ret < 0 ? ret : ret+fromIndex);
2000 str.pData->buffer, str.pData->length );
2001 return (ret < 0 ? ret : ret+fromIndex);
2009 template<
typename T >
2015 pData->buffer + fromIndex, pData->length - fromIndex,
2018 return n < 0 ? n : n + fromIndex;
2021 #if defined LIBO_INTERNAL_ONLY
2023 template<
typename T>
2026 indexOf(T & literal, sal_Int32 fromIndex = 0)
const {
2027 assert(fromIndex >= 0);
2029 pData->buffer + fromIndex, pData->length - fromIndex,
2032 return n < 0 ? n : n + fromIndex;
2036 sal_Int32 indexOf(OUStringLiteral
const & literal, sal_Int32 fromIndex = 0)
2040 pData->buffer + fromIndex, pData->length - fromIndex, literal.data,
2042 return n < 0 ? n : n + fromIndex;
2070 char const * str, sal_Int32 len, sal_Int32 fromIndex = 0)
const
2073 pData->buffer + fromIndex, pData->length - fromIndex, str, len);
2074 return ret < 0 ? ret : ret + fromIndex;
2081 #if SAL_TYPES_SIZEOFLONG == 8
2103 str.pData->buffer, str.pData->length );
2126 str.pData->buffer, str.pData->length );
2134 template<
typename T >
2140 pData->buffer, pData->length,
2145 #if defined LIBO_INTERNAL_ONLY
2147 template<
typename T>
2150 lastIndexOf(T & literal)
const {
2152 pData->buffer, pData->length,
2158 sal_Int32 lastIndexOf(OUStringLiteral
const & literal)
const {
2160 pData->buffer, pData->length, literal.data, literal.size);
2186 pData->buffer, pData->length, str, len);
2201 rtl_uString *pNew = NULL;
2220 rtl_uString *pNew = NULL;
2235 rtl_uString* pNew = NULL;
2240 #ifndef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
2243 return rStr1.
concat( rStr2 );
2262 rtl_uString* pNew = NULL;
2282 rtl_uString* pNew = NULL;
2306 OUString const & from,
OUString const & to, sal_Int32 * index = NULL)
const
2308 rtl_uString * s = NULL;
2311 &s, pData, from.pData, to.pData, index == NULL ? &i : index);
2333 template<
typename T >
2335 sal_Int32 * index = NULL)
const
2338 rtl_uString * s = NULL;
2344 index == NULL ? &i : index);
2366 template<
typename T >
2368 sal_Int32 * index = NULL)
const
2371 rtl_uString * s = NULL;
2374 &s, pData, from.pData,
2377 index == NULL ? &i : index);
2399 template<
typename T1,
typename T2 >
2405 rtl_uString * s = NULL;
2413 index == NULL ? &i : index);
2417 #if defined LIBO_INTERNAL_ONLY
2422 replaceFirst(T & from,
OUString const & to, sal_Int32 * index =
nullptr)
2425 rtl_uString * s =
nullptr;
2431 to.pData->buffer, to.pData->length, index ==
nullptr ? &i : index);
2433 throw std::bad_alloc();
2441 libreoffice_internal::ConstCharArrayDetector<T, OUString>::TypeUtf16
2442 replaceFirst(OUString
const & from, T & to, sal_Int32 * index =
nullptr)
2445 rtl_uString * s =
nullptr;
2448 &s, pData, from.pData->buffer, from.pData->length,
2449 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2450 libreoffice_internal::ConstCharArrayDetector<T>::length,
2451 index ==
nullptr ? &i : index);
2453 throw std::bad_alloc();
2461 libreoffice_internal::ConstCharArrayDetector<
2463 typename libreoffice_internal::ConstCharArrayDetector<
2464 T2, OUString>::TypeUtf16
2466 replaceFirst(T1 & from, T2 & to, sal_Int32 * index =
nullptr)
const {
2467 rtl_uString * s =
nullptr;
2471 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2472 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2473 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2474 libreoffice_internal::ConstCharArrayDetector<T2>::length,
2475 index ==
nullptr ? &i : index);
2477 throw std::bad_alloc();
2485 libreoffice_internal::ConstCharArrayDetector<
2487 typename libreoffice_internal::ConstCharArrayDetector<
2490 replaceFirst(T1 & from, T2 & to, sal_Int32 * index =
nullptr)
const {
2491 rtl_uString * s =
nullptr;
2495 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2496 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2497 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2498 libreoffice_internal::ConstCharArrayDetector<T2>::length,
2499 index ==
nullptr ? &i : index);
2501 throw std::bad_alloc();
2509 libreoffice_internal::ConstCharArrayDetector<
2511 typename libreoffice_internal::ConstCharArrayDetector<
2512 T2, OUString>::TypeUtf16
2514 replaceFirst(T1 & from, T2 & to, sal_Int32 * index =
nullptr)
const {
2515 rtl_uString * s =
nullptr;
2519 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2520 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2521 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2522 libreoffice_internal::ConstCharArrayDetector<T2>::length,
2523 index ==
nullptr ? &i : index);
2525 throw std::bad_alloc();
2533 OUStringLiteral
const & from, OUString
const & to,
2534 sal_Int32 * index =
nullptr)
const
2536 rtl_uString * s =
nullptr;
2539 &s, pData, from.data, from.size, to.pData,
2540 index ==
nullptr ? &i : index);
2545 OUString
const & from, OUStringLiteral
const & to,
2546 sal_Int32 * index =
nullptr)
const
2548 rtl_uString * s =
nullptr;
2551 &s, pData, from.pData, to.data, to.size,
2552 index ==
nullptr ? &i : index);
2557 OUStringLiteral
const & from, OUStringLiteral
const & to,
2558 sal_Int32 * index =
nullptr)
const
2560 rtl_uString * s =
nullptr;
2563 &s, pData, from.data, from.size, to.data, to.size,
2564 index ==
nullptr ? &i : index);
2569 typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::Type
2571 OUStringLiteral
const & from, T & to, sal_Int32 * index =
nullptr)
const
2573 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(to));
2574 rtl_uString * s =
nullptr;
2577 &s, pData, from.data, from.size,
2578 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2579 libreoffice_internal::ConstCharArrayDetector<T>::length,
2580 index ==
nullptr ? &i : index);
2585 typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::Type
2587 T & from, OUStringLiteral
const & to, sal_Int32 * index =
nullptr)
const
2589 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(from));
2590 rtl_uString * s =
nullptr;
2594 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(from),
2595 libreoffice_internal::ConstCharArrayDetector<T>::length, to.data,
2596 to.size, index ==
nullptr ? &i : index);
2602 libreoffice_internal::ConstCharArrayDetector<T, OUString >::TypeUtf16
2604 OUStringLiteral
const & from, T & to, sal_Int32 * index =
nullptr)
const
2606 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(to));
2607 rtl_uString * s =
nullptr;
2610 &s, pData, from.data, from.size,
2611 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2612 libreoffice_internal::ConstCharArrayDetector<T>::length,
2613 index ==
nullptr ? &i : index);
2619 libreoffice_internal::ConstCharArrayDetector<T, OUString >::TypeUtf16
2621 T & from, OUStringLiteral
const & to, sal_Int32 * index =
nullptr)
const
2623 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(from));
2624 rtl_uString * s =
nullptr;
2628 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(from),
2629 libreoffice_internal::ConstCharArrayDetector<T>::length, to.data,
2630 to.size, index ==
nullptr ? &i : index);
2653 rtl_uString * s = NULL;
2671 template<
typename T >
2675 rtl_uString * s = NULL;
2696 template<
typename T >
2700 rtl_uString * s = NULL;
2702 &s, pData, from.pData,
2721 template<
typename T1,
typename T2 >
2727 rtl_uString * s = NULL;
2737 #if defined LIBO_INTERNAL_ONLY
2742 replaceAll(T & from,
OUString const & to)
const {
2743 rtl_uString * s =
nullptr;
2748 to.pData->buffer, to.pData->length);
2750 throw std::bad_alloc();
2758 libreoffice_internal::ConstCharArrayDetector<T, OUString>::TypeUtf16
2759 replaceAll(OUString
const & from, T & to)
const {
2760 rtl_uString * s =
nullptr;
2762 &s, pData, from.pData->buffer, from.pData->length,
2763 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2764 libreoffice_internal::ConstCharArrayDetector<T>::length);
2766 throw std::bad_alloc();
2774 libreoffice_internal::ConstCharArrayDetector<
2776 typename libreoffice_internal::ConstCharArrayDetector<
2777 T2, OUString>::TypeUtf16
2779 replaceAll(T1 & from, T2 & to)
const {
2780 rtl_uString * s =
nullptr;
2783 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2784 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2785 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2786 libreoffice_internal::ConstCharArrayDetector<T2>::length);
2788 throw std::bad_alloc();
2796 libreoffice_internal::ConstCharArrayDetector<
2798 typename libreoffice_internal::ConstCharArrayDetector<
2801 replaceAll(T1 & from, T2 & to)
const {
2802 rtl_uString * s =
nullptr;
2805 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2806 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2807 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2808 libreoffice_internal::ConstCharArrayDetector<T2>::length);
2810 throw std::bad_alloc();
2818 libreoffice_internal::ConstCharArrayDetector<
2820 typename libreoffice_internal::ConstCharArrayDetector<
2821 T2, OUString>::TypeUtf16
2823 replaceAll(T1 & from, T2 & to)
const {
2824 rtl_uString * s =
nullptr;
2827 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2828 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2829 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2830 libreoffice_internal::ConstCharArrayDetector<T2>::length);
2832 throw std::bad_alloc();
2840 OUStringLiteral
const & from, OUString
const & to)
const
2842 rtl_uString * s =
nullptr;
2844 &s, pData, from.data, from.size, to.pData);
2849 OUString
const & from, OUStringLiteral
const & to)
const
2851 rtl_uString * s =
nullptr;
2853 &s, pData, from.pData, to.data, to.size);
2858 OUStringLiteral
const & from, OUStringLiteral
const & to)
const
2860 rtl_uString * s =
nullptr;
2862 &s, pData, from.data, from.size, to.data, to.size);
2867 typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::Type
2868 replaceAll(OUStringLiteral
const & from, T & to)
const {
2869 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(to));
2870 rtl_uString * s =
nullptr;
2872 &s, pData, from.data, from.size,
2873 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2874 libreoffice_internal::ConstCharArrayDetector<T>::length);
2879 typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::Type
2880 replaceAll(T & from, OUStringLiteral
const & to)
const {
2881 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(from));
2882 rtl_uString * s =
nullptr;
2885 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(from),
2886 libreoffice_internal::ConstCharArrayDetector<T>::length, to.data,
2893 libreoffice_internal::ConstCharArrayDetector<T, OUString >::TypeUtf16
2894 replaceAll(OUStringLiteral
const & from, T & to)
const {
2895 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(to));
2896 rtl_uString * s =
nullptr;
2898 &s, pData, from.data, from.size,
2899 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2900 libreoffice_internal::ConstCharArrayDetector<T>::length);
2906 libreoffice_internal::ConstCharArrayDetector<T, OUString >::TypeUtf16
2907 replaceAll(T & from, OUStringLiteral
const & to)
const {
2908 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(from));
2909 rtl_uString * s =
nullptr;
2912 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(from),
2913 libreoffice_internal::ConstCharArrayDetector<T>::length, to.data,
2931 rtl_uString* pNew = NULL;
2948 rtl_uString* pNew = NULL;
2968 rtl_uString* pNew = NULL;
2999 rtl_uString * pNew = NULL;
3019 return getToken(count, separator, n);
3043 return pData->buffer[0];
3154 rtl_uString * pNew = NULL;
3157 throw std::bad_alloc();
3190 sal_uInt32 *pInfo = NULL )
3192 rtl_uString * pNew = NULL;
3194 convertFlags, pInfo );
3196 throw std::bad_alloc();
3226 sal_uInt32 nFlags)
const
3229 pData->length, nEncoding, nFlags);
3284 sal_Int32 * indexUtf16, sal_Int32 incrementCodePoints = 1)
const
3287 pData, indexUtf16, incrementCodePoints);
3348 rtl_uString* pNewData = NULL;
3356 return number(
static_cast< unsigned long long >( i ), radix );
3362 return number(
static_cast< long long >( i ), radix );
3368 return number(
static_cast< unsigned long long >( i ), radix );
3375 rtl_uString* pNewData = NULL;
3384 rtl_uString* pNewData = NULL;
3401 rtl_uString* pNewData = NULL;
3418 rtl_uString* pNewData = NULL;
3453 rtl_uString* pNewData = NULL;
3482 return number( i, radix );
3497 return number( ll, radix );
3545 rtl_uString* pNew = NULL;
3551 OUString & internalAppend( rtl_uString* pOtherData )
3553 rtl_uString* pNewData = NULL;
3555 if (pNewData == NULL) {
3556 throw std::bad_alloc();
3565 #if defined LIBO_INTERNAL_ONLY
3571 void operator ==(OUString
const &, std::nullptr_t) =
delete;
3572 void operator ==(std::nullptr_t, OUString
const &) =
delete;
3573 void operator !=(OUString
const &, std::nullptr_t) =
delete;
3574 void operator !=(std::nullptr_t, OUString
const &) =
delete;
3577 #if defined LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
3584 struct ToStringHelper< OUString >
3586 static int length(
const OUString& s ) {
return s.getLength(); }
3587 static sal_Unicode* addData(
sal_Unicode* buffer,
const OUString& s ) {
return addDataHelper( buffer, s.getStr(), s.getLength()); }
3588 static const bool allowOStringConcat =
false;
3589 static const bool allowOUStringConcat =
true;
3596 struct ToStringHelper< OUStringLiteral >
3598 static int length(
const OUStringLiteral& str ) {
return str.size; }
3599 static sal_Unicode* addData(
sal_Unicode* buffer,
const OUStringLiteral& str ) {
return addDataLiteral( buffer, str.data, str.size ); }
3600 static const bool allowOStringConcat =
false;
3601 static const bool allowOUStringConcat =
true;
3607 template<
typename charT,
typename traits,
typename T1,
typename T2 >
3608 inline std::basic_ostream<charT, traits> &
operator <<(
3609 std::basic_ostream<charT, traits> & stream, OUStringConcat< T1, T2 >&& concat)
3611 return stream << OUString( std::move(concat) );
3634 {
return static_cast<size_t>(rString.
hashCode()); }
3697 template<
typename charT,
typename traits >
3699 std::basic_ostream<charT, traits> & stream,
OUString const & rString)
3709 #ifdef RTL_STRING_UNITTEST
3712 typedef rtlunittest::OUString OUString;
3719 #if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST
3720 using ::rtl::OUString;
3721 using ::rtl::OUStringHash;
3724 using ::rtl::OUStringLiteral;
3725 using ::rtl::OUStringLiteral1;
3734 #if defined LIBO_INTERNAL_ONLY
3741 {
return std::size_t(s.
hashCode()); }
#define RTL_USTR_MAX_VALUEOFINT32
Definition: ustring.h:957
sal_Int32 hashCode() const
Returns a hashcode for this string.
Definition: ustring.hxx:1927
bool equalsIgnoreAsciiCaseAscii(const sal_Char *asciiStr) const
Perform a ASCII lowercase comparison of two strings.
Definition: ustring.hxx:1161
OUString(sal_uInt32 const *codePoints, sal_Int32 codePointCount)
Create a new string from an array of Unicode code points.
Definition: ustring.hxx:381
friend OUString operator+(const OUString &rStr1, const OUString &rStr2)
Definition: ustring.hxx:2241
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:2260
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:909
OUString(rtl_uString *str)
New string from OUString data.
Definition: ustring.hxx:172
sal_Int32 reverseCompareTo(const OUString &str) const
Compares two strings in reverse order.
Definition: ustring.hxx:731
char sal_Char
A legacy synonym for char.
Definition: types.h:120
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:3381
sal_Int32 compareTo(const OUString &str, sal_Int32 maxLength) const
Compares two strings with a maximum count of characters.
Definition: ustring.hxx:713
static const OUString & unacquired(rtl_uString *const *ppHandle)
Provides an OUString const & passing a storage pointer of an rtl_uString * handle.
Definition: ustring.hxx:430
OUString(const sal_Unicode *value)
New string from a Unicode character buffer array.
Definition: ustring.hxx:216
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 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.
sal_Int32 lastIndexOf(sal_Unicode ch) const
Returns the index within this string of the last occurrence of the specified character,...
Definition: ustring.hxx:1960
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 sal_Int32 rtl_ustr_valueOfDouble(sal_Unicode *str, double d) SAL_THROW_EXTERN_C()
Create the string representation of a double.
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.
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &stream, OString const &rString)
Support for rtl::OString in std::ostream (and thus in CPPUNIT_ASSERT or SAL_INFO macros,...
Definition: string.hxx:1894
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:1498
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.
OString toUtf8() const
Convert this string to an OString, assuming that the string can be UTF-8-encoded successfully.
Definition: ustring.hxx:3322
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:2946
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:2280
OUString()
New string containing no characters.
Definition: ustring.hxx:133
OUString(sal_Unicode value)
New string from a single Unicode character.
Definition: ustring.hxx:194
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:645
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:2305
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.
sal_uInt16 rtl_TextEncoding
The various supported text encodings.
Definition: textenc.h:33
@ SAL_NO_ACQUIRE
definition of a no acquire enum for ctors
Definition: types.h:374
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:3187
sal_Int32 reverseCompareToAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength) const
Compares two strings in reverse order.
Definition: ustring.hxx:1090
OUString & operator=(const OUString &str)
Assign a new string.
Definition: ustring.hxx:438
bool match(const OUString &str, sal_Int32 fromIndex=0) const
Match against a substring appearing in this string.
Definition: ustring.hxx:897
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:1600
SAL_DLLPUBLIC void rtl_uString_newReplaceFirstUtf16LAsciiL(rtl_uString **newStr, rtl_uString *str, sal_Unicode 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.
#define RTL_STR_MAX_VALUEOFUINT64
Definition: string.h:673
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 RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
Definition: textcvt.h:132
SAL_DLLPUBLIC void rtl_uString_assign(rtl_uString **str, rtl_uString *rightValue) SAL_THROW_EXTERN_C()
Assign a new value to a string.
sal_Int32 lastIndexOf(const OUString &str) const
Returns the index within this string of the last occurrence of the specified substring,...
Definition: ustring.hxx:2100
Dummy Type
Definition: stringutils.hxx:264
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.
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 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_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.
static OUString fromUtf8(const OString &rSource)
Convert an OString to an OUString, assuming that the OString is UTF-8-encoded.
Definition: ustring.hxx:3299
#define RTL_USTR_MAX_VALUEOFBOOLEAN
Definition: ustring.h:915
sal_Int32 lastIndexOf(const OUString &str, sal_Int32 fromIndex) const
Returns the index within this string of the last occurrence of the specified substring,...
Definition: ustring.hxx:2123
sal_Int32 lastIndexOf(sal_Unicode ch, sal_Int32 fromIndex) const
Returns the index within this string of the last occurrence of the specified character,...
Definition: ustring.hxx:1977
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.
sal_Int32 compareToAscii(const sal_Char *asciiStr) const
Compares two strings.
Definition: ustring.hxx:1036
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:2367
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.
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:590
bool equalsAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength) const
Perform a comparison of two strings.
Definition: ustring.hxx:1134
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,...
Definition: ustring.hxx:1945
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:2183
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:743
sal_Int32 compareToIgnoreAsciiCase(const OUString &str) const
Perform a ASCII lowercase comparison of two strings.
Definition: ustring.hxx:832
sal_Int32 getLength() const
Returns the length of this string.
Definition: string.hxx:400
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:2723
#define OUSTRING_TO_OSTRING_CVTFLAGS
Definition: string.h:1325
Definition: stringutils.hxx:161
OUString getToken(sal_Int32 count, sal_Unicode separator) const
Returns a token from the string.
Definition: ustring.hxx:3017
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.
bool toBoolean() const
Returns the Boolean value from this string.
Definition: ustring.hxx:3030
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_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.
#define RTL_USTR_MAX_VALUEOFDOUBLE
Definition: ustring.h:1041
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:1617
static OUString createFromAscii(const sal_Char *value)
Returns a OUString copied without conversion from an ASCII character string.
Definition: ustring.hxx:3543
unsigned char sal_Bool
Definition: types.h:38
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.
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:2010
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.
SAL_WARN_UNUSED_RESULT OUString concat(const OUString &str) const
Concatenates the specified string to the end of this string.
Definition: ustring.hxx:2233
~OUString()
Release the string data.
Definition: ustring.hxx:414
OUString getToken(sal_Int32 token, sal_Unicode cTok, sal_Int32 &index) const
Returns a token in the string.
Definition: ustring.hxx:2997
float toFloat() const
Returns the float value from this string.
Definition: ustring.hxx:3118
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.
A helper to use OUStrings with hash maps.
Definition: ustring.hxx:3622
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.
OUString(const sal_Unicode *value, sal_Int32 length)
New string from a Unicode character buffer array.
Definition: ustring.hxx:230
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:1319
static OUString number(double d)
Returns the string representation of the double argument.
Definition: ustring.hxx:3415
SAL_DLLPUBLIC void rtl_uString_newReplaceAllUtf16LAsciiL(rtl_uString **newStr, rtl_uString *str, sal_Unicode 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_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:2929
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_Int32 getLength() const
Returns the length of this string.
Definition: ustring.hxx:641
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:252
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.
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:1692
#define RTL_STR_MAX_VALUEOFINT64
Definition: string.h:650
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.
SAL_DLLPUBLIC void rtl_uString_newFromLiteral(rtl_uString **newStr, const sal_Char *value, sal_Int32 len, sal_Int32 allocExtra) SAL_THROW_EXTERN_C()
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_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.
SAL_DLLPUBLIC double rtl_ustr_toDouble(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Interpret a string as a double.
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 void rtl_uString_new(rtl_uString **newStr) SAL_THROW_EXTERN_C()
Allocate a new string containing no characters.
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,...
Definition: ustring.hxx:1997
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:1395
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.
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_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_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_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.
sal_Int64 toInt64(sal_Int16 radix=10) const
Returns the int64 value from this string.
Definition: ustring.hxx:3088
#define RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
Definition: textcvt.h:64
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.
sal_uInt32 toUInt32(sal_Int16 radix=10) const
Returns the uint32 value from this string.
Definition: ustring.hxx:3073
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 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_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:2697
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.
#define OSTRING_TO_OUSTRING_CVTFLAGS
Definition: ustring.h:2120
__sal_NoAcquire
Definition: types.h:370
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.
OUString(rtl_uString *str, __sal_NoAcquire)
New OUString from OUString data without acquiring it.
Definition: ustring.hxx:186
void clear()
Clears the string, i.e, makes a zero-character string.
Definition: ustring.hxx:628
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:3283
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:354
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:2334
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:2069
SAL_DLLPUBLIC void rtl_uString_intern(rtl_uString **newStr, rtl_uString *str) SAL_THROW_EXTERN_C()
Return a canonical representation for a string.
sal_Int32 compareToIgnoreAsciiCaseAscii(const sal_Char *asciiStr) const
Compares two ASCII strings ignoring case.
Definition: ustring.hxx:1184
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.
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator==(const OUString &rString, T &literal)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1733
#define SAL_DEPRECATED(message)
Use as follows: SAL_DEPRECATED("Don't use, it's evil.") void doit(int nPara);.
Definition: types.h:477
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator==(T &literal, const OUString &rString)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1749
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:2672
#define RTL_TEXTENCODING_UTF8
Definition: textenc.h:113
static OUString number(int i, sal_Int16 radix=10)
Returns the string representation of the integer argument.
Definition: ustring.hxx:3345
bool startsWith(OUString const &str, OUString *rest=NULL) const
Check whether this string starts with a given substring.
Definition: ustring.hxx:1305
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:2650
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:1238
OUString & operator+=(const OUString &str)
Append a string to this string.
Definition: ustring.hxx:540
bool operator<(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:90
SAL_DLLPUBLIC sal_Int32 rtl_ustr_toInt32(const sal_Unicode *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an integer.
SAL_DLLPUBLIC void rtl_uString_release(rtl_uString *str) SAL_THROW_EXTERN_C() SAL_HOT
Decrement the reference count of a string.
bool equalsIgnoreAsciiCase(const OUString &str) const
Perform a ASCII lowercase comparison of two strings.
Definition: ustring.hxx:807
bool equalsIgnoreAsciiCaseAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength) const
Perform an ASCII lowercase comparison of two strings.
Definition: ustring.hxx:1209
#define SAL_WARN_UNUSED_RESULT
Use this as markup for functions and methods whose return value must be checked.
Definition: types.h:302
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 RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR
Definition: textcvt.h:71
#define RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR
Definition: textcvt.h:138
static OUString number(float f)
Returns the string representation of the float argument.
Definition: ustring.hxx:3398
Definition: bootstrap.hxx:29
OUString intern() const
Return a canonical representation for a string.
Definition: ustring.hxx:3152
This String class provides base functionality for C++ like Unicode character array handling.
Definition: ustring.hxx:123
bool operator>(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:100
bool equals(const OUString &str) const
Perform a comparison of two strings.
Definition: ustring.hxx:783
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:2218
sal_Int32 toInt32(sal_Int16 radix=10) const
Returns the int32 value from this string.
Definition: ustring.hxx:3056
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.
#define RTL_USTR_MAX_VALUEOFFLOAT
Definition: ustring.h:1022
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_uInt16 sal_Unicode
Definition: types.h:141
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_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 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.
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:1412
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 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_newReplaceFirstUtf16LUtf16L(rtl_uString **newStr, rtl_uString *str, sal_Unicode const *from, sal_Int32 fromLength, sal_Unicode 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.
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:3366
double toDouble() const
Returns the double value from this string.
Definition: ustring.hxx:3131
SAL_DLLPUBLIC void rtl_uString_acquire(rtl_uString *str) SAL_THROW_EXTERN_C() SAL_HOT
Increment the reference count of a string.
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.
SAL_WARN_UNUSED_RESULT OUString copy(sal_Int32 beginIndex) const
Returns a new string that is a substring of this string.
Definition: ustring.hxx:2199
This String class provide base functionality for C++ like 8-Bit character array handling.
Definition: string.hxx:92
bool convertToString(OString *pTarget, rtl_TextEncoding nEncoding, sal_uInt32 nFlags) const
Converts to an OString, signalling failure.
Definition: ustring.hxx:3225
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.
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.
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.
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:3680
sal_uInt64 toUInt64(sal_Int16 radix=10) const
Returns the uint64 value from this string.
Definition: ustring.hxx:3105
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfBoolean(sal_Unicode *str, sal_Bool b) SAL_THROW_EXTERN_C()
Create the string representation of a boolean.
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator!=(T &literal, const OUString &rString)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1781
Definition: stringutils.hxx:118
SAL_DLLPUBLIC sal_Bool rtl_ustr_toBoolean(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Interpret a string as a boolean.
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:845
const sal_Char * getStr() const SAL_RETURNS_NONNULL
Returns a pointer to the characters of this string.
Definition: string.hxx:426
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:1276
bool operator==(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:110
#define RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
Definition: textcvt.h:68
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:2966
bool equalsAscii(const sal_Char *asciiStr) const
Perform a comparison of two strings.
Definition: ustring.hxx:1111
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.
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:966
bool isEmpty() const
Checks if a string is empty.
Definition: ustring.hxx:651
SAL_DLLPUBLIC void rtl_uString_newConcatUtf16L(rtl_uString **newString, rtl_uString *left, sal_Unicode const *right, sal_Int32 rightLength)
Create a new string that is the concatenation of two other strings.
bool endsWithAsciiL(char const *asciiStr, sal_Int32 asciiStrLength) const
Check whether this string ends with a given ASCII string.
Definition: ustring.hxx:1571
SAL_DLLPUBLIC void rtl_uString_newReplaceFirstAsciiLUtf16L(rtl_uString **newStr, rtl_uString *str, char const *from, sal_Int32 fromLength, sal_Unicode 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.
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:2135
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:3360
bool endsWith(OUString const &str, OUString *rest=NULL) const
Check whether this string ends with a given substring.
Definition: ustring.hxx:1482
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfFloat(sal_Unicode *str, float f) SAL_THROW_EXTERN_C()
Create the string representation of a float.
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:3354
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.
OUString(const OUString &str)
New string from OUString.
Definition: ustring.hxx:144
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.
size_t operator()(const OUString &rString) const
Compute a hash code for a string.
Definition: ustring.hxx:3633
sal_Unicode toChar() const
Returns the first character from this string.
Definition: ustring.hxx:3041
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator!=(const OUString &rString, T &literal)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1765
SAL_DLLPUBLIC void rtl_uString_newReplaceAllAsciiLUtf16L(rtl_uString **newStr, rtl_uString *str, char const *from, sal_Int32 fromLength, sal_Unicode 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 float rtl_ustr_toFloat(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Interpret a string as a float.
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:3372
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:476
sal_Int32 compareTo(const OUString &str) const
Compares two strings.
Definition: ustring.hxx:692
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:3656
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.
Dummy Type
Definition: stringutils.hxx:291
static OUString boolean(bool b)
Returns the string representation of the boolean argument.
Definition: ustring.hxx:3450
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:979
const sal_Unicode * getStr() const SAL_RETURNS_NONNULL
Returns a pointer to the Unicode character buffer for this string.
Definition: ustring.hxx:663
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:2401
SAL_DLLPUBLIC void rtl_uString_newReplaceAllUtf16LUtf16L(rtl_uString **newStr, rtl_uString *str, sal_Unicode const *from, sal_Int32 fromLength, sal_Unicode const *to, sal_Int32 toLength) SAL_THROW_EXTERN_C()
Create a new string by replacing all occurrences of a given substring with another substring.