20 #ifndef INCLUDED_RTL_USTRING_HXX 21 #define INCLUDED_RTL_USTRING_HXX 32 #if defined LIBO_INTERNAL_ONLY 33 #include <string_view> 41 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 45 #ifdef RTL_STRING_UNITTEST 46 extern bool rtl_string_unittest_invalid_conversion;
54 #ifdef RTL_STRING_UNITTEST 55 #define rtl rtlunittest 63 #ifdef RTL_STRING_UNITTEST 67 #if defined LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 78 template<
typename T> constexpr OUStringLiteral(
80 typename libreoffice_internal::ConstCharArrayDetector<
81 T, libreoffice_internal::Dummy>::Type
82 = libreoffice_internal::Dummy()):
83 size(libreoffice_internal::ConstCharArrayDetector<T>::length),
85 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(literal))
88 libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal));
95 constexpr sal_Int32 getLength()
const {
return size; }
153 #ifndef _MSC_VER // TODO? 154 #if defined LIBO_INTERNAL_ONLY 203 #if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST_CONCAT 254 template<
typename T >
269 #ifdef RTL_STRING_UNITTEST 270 rtl_string_unittest_const_literal =
true;
274 #if defined LIBO_INTERNAL_ONLY 288 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(
290 libreoffice_internal::ConstCharArrayDetector<T>::length);
295 #ifdef RTL_STRING_UNITTEST 300 template<
typename T >
305 rtl_string_unittest_invalid_conversion =
true;
311 template<
typename T >
316 rtl_string_unittest_invalid_conversion =
true;
320 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 337 OUString(OUStringLiteral literal): pData(NULL) {
364 throw std::bad_alloc();
385 sal_uInt32
const * codePoints, sal_Int32 codePointCount):
390 throw std::bad_alloc();
394 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 399 template<
typename T1,
typename T2 >
400 OUString( OUStringConcat< T1, T2 >&& c )
402 const sal_Int32 l = c.length();
414 #if defined LIBO_INTERNAL_ONLY 415 OUString(std::u16string_view sv) {
416 if (sv.size() > sal_uInt32(std::numeric_limits<sal_Int32>::max())) {
417 throw std::bad_alloc();
444 {
return * reinterpret_cast< OUString const * >( ppHandle ); }
457 #ifndef _MSC_VER // TODO? 458 #if defined LIBO_INTERNAL_ONLY 488 template<
typename T >
505 #if defined LIBO_INTERNAL_ONLY 510 operator =(T & literal) {
516 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(
518 libreoffice_internal::ConstCharArrayDetector<T>::length);
524 OUString & operator =(OUStringLiteral
const & literal) {
525 if (literal.size == 0) {
534 #if defined LIBO_INTERNAL_ONLY 543 inline OUString & operator+=(
const OUStringBuffer & str ) &;
554 #if defined LIBO_INTERNAL_ONLY 558 return internalAppend(str.pData);
560 #if defined LIBO_INTERNAL_ONLY 561 void operator+=(
OUString const &) && =
delete;
572 operator +=(T & literal)
573 #if defined LIBO_INTERNAL_ONLY 585 #if defined LIBO_INTERNAL_ONLY 588 operator +=(T &) && =
delete;
591 #if defined LIBO_INTERNAL_ONLY 596 operator +=(T & literal) & {
605 libreoffice_internal::ConstCharArrayDetector<T, OUString &>::TypeUtf16
606 operator +=(T &) && =
delete;
609 OUString & operator +=(OUStringLiteral
const & literal) & {
613 void operator +=(OUStringLiteral
const &) && =
delete;
616 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 621 template<
typename T1,
typename T2 >
622 OUString& operator+=( OUStringConcat< T1, T2 >&& c ) & {
623 sal_Int32 l = c.length();
628 sal_Unicode* end = c.addData( pData->buffer + pData->length );
633 template<
typename T1,
typename T2>
void operator +=(
634 OUStringConcat<T1, T2> &&) && =
delete;
666 return pData->length == 0;
689 assert(index >= 0 && static_cast<sal_uInt32>(index) < static_cast<sal_uInt32>(getLength()));
690 return getStr()[index];
708 str.pData->buffer, str.pData->length );
729 str.pData->buffer, str.pData->length, maxLength );
747 str.pData->buffer, str.pData->length );
755 template<
typename T >
761 pData->buffer, pData->length,
766 #if defined LIBO_INTERNAL_ONLY 771 reverseCompareTo(T & literal)
const {
773 pData->buffer, pData->length,
779 sal_Int32 reverseCompareTo(OUStringLiteral
const & literal)
const {
781 pData->buffer, pData->length, literal.data, literal.size);
798 if ( pData->length != str.pData->length )
800 if ( pData == str.pData )
803 str.pData->buffer, str.pData->length ) == 0;
822 if ( pData->length != str.pData->length )
824 if ( pData == str.pData )
827 str.pData->buffer, str.pData->length ) == 0;
848 str.pData->buffer, str.pData->length );
857 template<
typename T >
866 pData->buffer, pData->length,
872 #if defined LIBO_INTERNAL_ONLY 876 equalsIgnoreAsciiCase(T & literal)
const {
879 pData->buffer, pData->length,
887 bool equalsIgnoreAsciiCase(OUStringLiteral
const & literal)
const {
888 return pData->length == literal.size
890 pData->buffer, pData->length, literal.data)
913 str.pData->buffer, str.pData->length, str.pData->length ) == 0;
921 template<
typename T >
928 pData->buffer+fromIndex, pData->length-fromIndex,
935 #if defined LIBO_INTERNAL_ONLY 939 match(T & literal, sal_Int32 fromIndex = 0)
const {
940 assert(fromIndex >= 0);
943 pData->buffer + fromIndex, pData->length - fromIndex,
952 bool match(OUStringLiteral
const & literal, sal_Int32 fromIndex = 0)
const {
955 pData->buffer + fromIndex, pData->length - fromIndex,
956 literal.data, literal.size)
982 str.pData->buffer, str.pData->length,
983 str.pData->length ) == 0;
991 template<
typename T >
998 pData->buffer+fromIndex, pData->length-fromIndex,
1005 #if defined LIBO_INTERNAL_ONLY 1007 template<
typename T>
1009 matchIgnoreAsciiCase(T & literal, sal_Int32 fromIndex = 0)
const {
1010 assert(fromIndex >= 0);
1013 pData->buffer + fromIndex, pData->length - fromIndex,
1022 bool matchIgnoreAsciiCase(
1023 OUStringLiteral
const & literal, sal_Int32 fromIndex = 0)
const 1027 pData->buffer+fromIndex, pData->length-fromIndex, literal.data,
1077 "replace s1.compareToAscii(s2, strlen(s2)) == 0 with s1.startsWith(s2)")
1078 sal_Int32 compareToAscii( const
sal_Char * asciiStr, sal_Int32 maxLength )
const 1081 asciiStr, maxLength );
1106 asciiStr, asciiStrLength );
1149 if ( pData->length != asciiStrLength )
1153 pData->buffer, asciiStr, asciiStrLength );
1224 if ( pData->length != asciiStrLength )
1254 asciiStr, asciiStrLength ) == 0;
1261 #if SAL_TYPES_SIZEOFLONG == 8 1292 asciiStr, asciiStrLength ) == 0;
1299 #if SAL_TYPES_SIZEOFLONG == 8 1319 bool b = match(str);
1320 if (b && rest != NULL) {
1331 template<
typename T >
1333 T & literal,
OUString * rest = NULL)
const 1339 <= sal_uInt32(pData->length))
1345 if (b && rest != NULL) {
1352 #if defined LIBO_INTERNAL_ONLY 1354 template<
typename T>
1356 startsWith(T & literal,
OUString * rest =
nullptr)
const {
1359 <= sal_uInt32(pData->length))
1367 if (b && rest !=
nullptr) {
1375 bool startsWith(OUStringLiteral
const & literal, OUString * rest =
nullptr)
1378 bool b = literal.size <= pData->length
1380 pData->buffer, literal.data, literal.size);
1381 if (b && rest !=
nullptr) {
1382 *rest = copy(literal.size);
1411 bool b = matchIgnoreAsciiCase(str);
1412 if (b && rest != NULL) {
1423 template<
typename T >
1437 if (b && rest != NULL) {
1444 #if defined LIBO_INTERNAL_ONLY 1446 template<
typename T>
1448 startsWithIgnoreAsciiCase(T & literal,
OUString * rest =
nullptr)
const {
1451 <= sal_uInt32(pData->length))
1459 if (b && rest !=
nullptr) {
1467 bool startsWithIgnoreAsciiCase(
1468 OUStringLiteral
const & literal, OUString * rest =
nullptr)
const 1472 pData->buffer, literal.size, literal.data, literal.size)
1474 if (b && rest !=
nullptr) {
1475 *rest = copy(literal.size);
1497 && match(str, getLength() - str.
getLength());
1498 if (b && rest != NULL) {
1499 *rest = copy(0, getLength() - str.
getLength());
1509 template<
typename T >
1517 <= sal_uInt32(pData->length))
1519 (pData->buffer + pData->length
1524 if (b && rest != NULL) {
1533 #if defined LIBO_INTERNAL_ONLY 1535 template<
typename T>
1537 endsWith(T & literal,
OUString * rest =
nullptr)
const {
1540 <= sal_uInt32(pData->length))
1542 (pData->buffer + pData->length
1549 if (b && rest !=
nullptr) {
1559 bool endsWith(OUStringLiteral
const & literal, OUString * rest =
nullptr)
1562 bool b = literal.size <= pData->length
1564 pData->buffer + pData->length - literal.size,
1565 literal.data, literal.size);
1566 if (b && rest !=
nullptr) {
1567 *rest = copy(0, (getLength() - literal.size));
1587 return asciiStrLength <= pData->length
1589 pData->buffer + pData->length - asciiStrLength, asciiStr,
1616 && matchIgnoreAsciiCase(str, getLength() - str.
getLength());
1617 if (b && rest != NULL) {
1618 *rest = copy(0, getLength() - str.
getLength());
1628 template<
typename T >
1636 <= sal_uInt32(pData->length))
1638 (pData->buffer + pData->length
1645 if (b && rest != NULL) {
1654 #if defined LIBO_INTERNAL_ONLY 1656 template<
typename T>
1658 endsWithIgnoreAsciiCase(T & literal,
OUString * rest =
nullptr)
const {
1661 <= sal_uInt32(pData->length))
1663 (pData->buffer + pData->length
1670 if (b && rest !=
nullptr) {
1680 bool endsWithIgnoreAsciiCase(
1681 OUStringLiteral
const & literal, OUString * rest =
nullptr)
const 1683 bool b = literal.size <= pData->length
1685 pData->buffer + pData->length - literal.size,
1686 literal.size, literal.data, literal.size)
1688 if (b && rest !=
nullptr) {
1689 *rest = copy(0, getLength() - literal.size);
1706 char const * asciiStr, sal_Int32 asciiStrLength)
const 1708 return asciiStrLength <= pData->length
1710 pData->buffer + pData->length - asciiStrLength,
1711 asciiStrLength, asciiStr, asciiStrLength)
1716 {
return rStr1.
equals(rStr2); }
1718 {
return rStr1.
compareTo( pStr2 ) == 0; }
1730 {
return rStr1.
compareTo( rStr2 ) < 0; }
1732 {
return rStr1.
compareTo( rStr2 ) > 0; }
1734 {
return rStr1.
compareTo( rStr2 ) <= 0; }
1736 {
return rStr1.
compareTo( rStr2 ) >= 0; }
1745 template<
typename T >
1761 template<
typename T >
1777 template<
typename T >
1793 template<
typename T >
1803 #if defined LIBO_INTERNAL_ONLY 1809 string.pData->buffer,
string.pData->length,
1816 template<
typename T>
friend typename libreoffice_internal::ConstCharArrayDetector<T, bool>::TypeUtf16
1820 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(
1822 libreoffice_internal::ConstCharArrayDetector<T>::length,
1823 string.pData->buffer,
string.pData->length)
1827 template<
typename T>
friend typename libreoffice_internal::ConstCharArrayDetector<T, bool>::TypeUtf16
1831 string.pData->buffer,
string.pData->length,
1832 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(
1834 libreoffice_internal::ConstCharArrayDetector<T>::length)
1838 template<
typename T>
friend typename libreoffice_internal::ConstCharArrayDetector<T, bool>::TypeUtf16
1842 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(
1844 libreoffice_internal::ConstCharArrayDetector<T>::length,
1845 string.pData->buffer,
string.pData->length)
1850 #if defined LIBO_INTERNAL_ONLY 1858 friend bool operator ==(OUString
const & lhs, OUStringLiteral
const & rhs) {
1859 return lhs.equalsAsciiL(rhs.data, rhs.size);
1862 friend bool operator !=(OUString
const & lhs, OUStringLiteral
const & rhs) {
1863 return !lhs.equalsAsciiL(rhs.data, rhs.size);
1866 friend bool operator <(OUString
const & lhs, OUStringLiteral
const & rhs) {
1869 lhs.pData->buffer, lhs.pData->length, rhs.data))
1873 friend bool operator <=(OUString
const & lhs, OUStringLiteral
const & rhs) {
1876 lhs.pData->buffer, lhs.pData->length, rhs.data))
1880 friend bool operator >(OUString
const & lhs, OUStringLiteral
const & rhs) {
1883 lhs.pData->buffer, lhs.pData->length, rhs.data))
1887 friend bool operator >=(OUString
const & lhs, OUStringLiteral
const & rhs) {
1890 lhs.pData->buffer, lhs.pData->length, rhs.data))
1894 friend bool operator ==(OUStringLiteral
const & lhs, OUString
const & rhs) {
1895 return rhs.equalsAsciiL(lhs.data, lhs.size);
1898 friend bool operator !=(OUStringLiteral
const & lhs, OUString
const & rhs) {
1899 return !rhs.equalsAsciiL(lhs.data, lhs.size);
1902 friend bool operator <(OUStringLiteral
const & lhs, OUString
const & rhs) {
1905 rhs.pData->buffer, rhs.pData->length, lhs.data))
1909 friend bool operator <=(OUStringLiteral
const & lhs, OUString
const & rhs) {
1912 rhs.pData->buffer, rhs.pData->length, lhs.data))
1916 friend bool operator >(OUStringLiteral
const & lhs, OUString
const & rhs) {
1919 rhs.pData->buffer, rhs.pData->length, lhs.data))
1923 friend bool operator >=(OUStringLiteral
const & lhs, OUString
const & rhs) {
1926 rhs.pData->buffer, rhs.pData->length, lhs.data))
1961 return (ret < 0 ? ret : ret+fromIndex);
2013 str.pData->buffer, str.pData->length );
2014 return (ret < 0 ? ret : ret+fromIndex);
2022 template<
typename T >
2028 pData->buffer + fromIndex, pData->length - fromIndex,
2031 return n < 0 ? n : n + fromIndex;
2034 #if defined LIBO_INTERNAL_ONLY 2036 template<
typename T>
2039 indexOf(T & literal, sal_Int32 fromIndex = 0)
const {
2040 assert(fromIndex >= 0);
2042 pData->buffer + fromIndex, pData->length - fromIndex,
2045 return n < 0 ? n : n + fromIndex;
2049 sal_Int32 indexOf(OUStringLiteral
const & literal, sal_Int32 fromIndex = 0)
2053 pData->buffer + fromIndex, pData->length - fromIndex, literal.data,
2055 return n < 0 ? n : n + fromIndex;
2083 char const * str, sal_Int32 len, sal_Int32 fromIndex = 0)
const 2086 pData->buffer + fromIndex, pData->length - fromIndex, str, len);
2087 return ret < 0 ? ret : ret + fromIndex;
2094 #if SAL_TYPES_SIZEOFLONG == 8 2116 str.pData->buffer, str.pData->length );
2139 str.pData->buffer, str.pData->length );
2147 template<
typename T >
2153 pData->buffer, pData->length,
2158 #if defined LIBO_INTERNAL_ONLY 2160 template<
typename T>
2163 lastIndexOf(T & literal)
const {
2165 pData->buffer, pData->length,
2171 sal_Int32 lastIndexOf(OUStringLiteral
const & literal)
const {
2173 pData->buffer, pData->length, literal.data, literal.size);
2199 pData->buffer, pData->length, str, len);
2214 rtl_uString *pNew = NULL;
2233 rtl_uString *pNew = NULL;
2248 rtl_uString* pNew = NULL;
2253 #ifndef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 2256 return rStr1.
concat( rStr2 );
2275 rtl_uString* pNew = NULL;
2295 rtl_uString* pNew = NULL;
2319 OUString const & from,
OUString const & to, sal_Int32 * index = NULL)
const 2321 rtl_uString * s = NULL;
2324 &s, pData, from.pData, to.pData, index == NULL ? &i : index);
2346 template<
typename T >
2348 sal_Int32 * index = NULL)
const 2351 rtl_uString * s = NULL;
2357 index == NULL ? &i : index);
2379 template<
typename T >
2381 sal_Int32 * index = NULL)
const 2384 rtl_uString * s = NULL;
2387 &s, pData, from.pData,
2390 index == NULL ? &i : index);
2412 template<
typename T1,
typename T2 >
2418 rtl_uString * s = NULL;
2426 index == NULL ? &i : index);
2430 #if defined LIBO_INTERNAL_ONLY 2432 template<
typename T> [[nodiscard]]
2435 replaceFirst(T & from,
OUString const & to, sal_Int32 * index =
nullptr)
2438 rtl_uString * s =
nullptr;
2444 to.pData->buffer, to.pData->length, index ==
nullptr ? &i : index);
2446 throw std::bad_alloc();
2452 template<
typename T> [[nodiscard]]
2454 libreoffice_internal::ConstCharArrayDetector<T, OUString>::TypeUtf16
2455 replaceFirst(OUString
const & from, T & to, sal_Int32 * index =
nullptr)
2458 rtl_uString * s =
nullptr;
2461 &s, pData, from.pData->buffer, from.pData->length,
2462 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2463 libreoffice_internal::ConstCharArrayDetector<T>::length,
2464 index ==
nullptr ? &i : index);
2466 throw std::bad_alloc();
2472 template<
typename T1,
typename T2> [[nodiscard]]
2474 libreoffice_internal::ConstCharArrayDetector<
2476 typename libreoffice_internal::ConstCharArrayDetector<
2477 T2, OUString>::TypeUtf16
2479 replaceFirst(T1 & from, T2 & to, sal_Int32 * index =
nullptr)
const {
2480 rtl_uString * s =
nullptr;
2484 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2485 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2486 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2487 libreoffice_internal::ConstCharArrayDetector<T2>::length,
2488 index ==
nullptr ? &i : index);
2490 throw std::bad_alloc();
2496 template<
typename T1,
typename T2> [[nodiscard]]
2498 libreoffice_internal::ConstCharArrayDetector<
2500 typename libreoffice_internal::ConstCharArrayDetector<
2503 replaceFirst(T1 & from, T2 & to, sal_Int32 * index =
nullptr)
const {
2504 rtl_uString * s =
nullptr;
2508 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2509 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2510 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2511 libreoffice_internal::ConstCharArrayDetector<T2>::length,
2512 index ==
nullptr ? &i : index);
2514 throw std::bad_alloc();
2520 template<
typename T1,
typename T2> [[nodiscard]]
2522 libreoffice_internal::ConstCharArrayDetector<
2524 typename libreoffice_internal::ConstCharArrayDetector<
2525 T2, OUString>::TypeUtf16
2527 replaceFirst(T1 & from, T2 & to, sal_Int32 * index =
nullptr)
const {
2528 rtl_uString * s =
nullptr;
2532 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2533 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2534 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2535 libreoffice_internal::ConstCharArrayDetector<T2>::length,
2536 index ==
nullptr ? &i : index);
2538 throw std::bad_alloc();
2545 [[nodiscard]] OUString replaceFirst(
2546 OUStringLiteral
const & from, OUString
const & to,
2547 sal_Int32 * index =
nullptr)
const 2549 rtl_uString * s =
nullptr;
2552 &s, pData, from.data, from.size, to.pData,
2553 index ==
nullptr ? &i : index);
2557 [[nodiscard]] OUString replaceFirst(
2558 OUString
const & from, OUStringLiteral
const & to,
2559 sal_Int32 * index =
nullptr)
const 2561 rtl_uString * s =
nullptr;
2564 &s, pData, from.pData, to.data, to.size,
2565 index ==
nullptr ? &i : index);
2569 [[nodiscard]] OUString replaceFirst(
2570 OUStringLiteral
const & from, OUStringLiteral
const & to,
2571 sal_Int32 * index =
nullptr)
const 2573 rtl_uString * s =
nullptr;
2576 &s, pData, from.data, from.size, to.data, to.size,
2577 index ==
nullptr ? &i : index);
2581 template<
typename T> [[nodiscard]]
2582 typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::Type
2584 OUStringLiteral
const & from, T & to, sal_Int32 * index =
nullptr)
const 2586 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(to));
2587 rtl_uString * s =
nullptr;
2590 &s, pData, from.data, from.size,
2591 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2592 libreoffice_internal::ConstCharArrayDetector<T>::length,
2593 index ==
nullptr ? &i : index);
2597 template<
typename T> [[nodiscard]]
2598 typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::Type
2600 T & from, OUStringLiteral
const & to, sal_Int32 * index =
nullptr)
const 2602 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(from));
2603 rtl_uString * s =
nullptr;
2607 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(from),
2608 libreoffice_internal::ConstCharArrayDetector<T>::length, to.data,
2609 to.size, index ==
nullptr ? &i : index);
2613 template<
typename T> [[nodiscard]]
2615 libreoffice_internal::ConstCharArrayDetector<T, OUString >::TypeUtf16
2617 OUStringLiteral
const & from, T & to, sal_Int32 * index =
nullptr)
const 2619 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(to));
2620 rtl_uString * s =
nullptr;
2623 &s, pData, from.data, from.size,
2624 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2625 libreoffice_internal::ConstCharArrayDetector<T>::length,
2626 index ==
nullptr ? &i : index);
2630 template<
typename T> [[nodiscard]]
2632 libreoffice_internal::ConstCharArrayDetector<T, OUString >::TypeUtf16
2634 T & from, OUStringLiteral
const & to, sal_Int32 * index =
nullptr)
const 2636 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(from));
2637 rtl_uString * s =
nullptr;
2641 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(from),
2642 libreoffice_internal::ConstCharArrayDetector<T>::length, to.data,
2643 to.size, index ==
nullptr ? &i : index);
2666 rtl_uString * s = NULL;
2684 template<
typename T >
2688 rtl_uString * s = NULL;
2709 template<
typename T >
2713 rtl_uString * s = NULL;
2715 &s, pData, from.pData,
2734 template<
typename T1,
typename T2 >
2740 rtl_uString * s = NULL;
2750 #if defined LIBO_INTERNAL_ONLY 2752 template<
typename T> [[nodiscard]]
2755 replaceAll(T & from,
OUString const & to)
const {
2756 rtl_uString * s =
nullptr;
2761 to.pData->buffer, to.pData->length);
2763 throw std::bad_alloc();
2769 template<
typename T> [[nodiscard]]
2771 libreoffice_internal::ConstCharArrayDetector<T, OUString>::TypeUtf16
2772 replaceAll(OUString
const & from, T & to)
const {
2773 rtl_uString * s =
nullptr;
2775 &s, pData, from.pData->buffer, from.pData->length,
2776 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2777 libreoffice_internal::ConstCharArrayDetector<T>::length);
2779 throw std::bad_alloc();
2785 template<
typename T1,
typename T2> [[nodiscard]]
2787 libreoffice_internal::ConstCharArrayDetector<
2789 typename libreoffice_internal::ConstCharArrayDetector<
2790 T2, OUString>::TypeUtf16
2792 replaceAll(T1 & from, T2 & to)
const {
2793 rtl_uString * s =
nullptr;
2796 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2797 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2798 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2799 libreoffice_internal::ConstCharArrayDetector<T2>::length);
2801 throw std::bad_alloc();
2807 template<
typename T1,
typename T2> [[nodiscard]]
2809 libreoffice_internal::ConstCharArrayDetector<
2811 typename libreoffice_internal::ConstCharArrayDetector<
2814 replaceAll(T1 & from, T2 & to)
const {
2815 rtl_uString * s =
nullptr;
2818 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2819 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2820 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2821 libreoffice_internal::ConstCharArrayDetector<T2>::length);
2823 throw std::bad_alloc();
2829 template<
typename T1,
typename T2> [[nodiscard]]
2831 libreoffice_internal::ConstCharArrayDetector<
2833 typename libreoffice_internal::ConstCharArrayDetector<
2834 T2, OUString>::TypeUtf16
2836 replaceAll(T1 & from, T2 & to)
const {
2837 rtl_uString * s =
nullptr;
2840 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2841 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2842 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2843 libreoffice_internal::ConstCharArrayDetector<T2>::length);
2845 throw std::bad_alloc();
2852 [[nodiscard]] OUString replaceAll(
2853 OUStringLiteral
const & from, OUString
const & to)
const 2855 rtl_uString * s =
nullptr;
2857 &s, pData, from.data, from.size, to.pData);
2861 [[nodiscard]] OUString replaceAll(
2862 OUString
const & from, OUStringLiteral
const & to)
const 2864 rtl_uString * s =
nullptr;
2866 &s, pData, from.pData, to.data, to.size);
2870 [[nodiscard]] OUString replaceAll(
2871 OUStringLiteral
const & from, OUStringLiteral
const & to)
const 2873 rtl_uString * s =
nullptr;
2875 &s, pData, from.data, from.size, to.data, to.size);
2879 template<
typename T> [[nodiscard]]
2880 typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::Type
2881 replaceAll(OUStringLiteral
const & from, T & to)
const {
2882 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(to));
2883 rtl_uString * s =
nullptr;
2885 &s, pData, from.data, from.size,
2886 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2887 libreoffice_internal::ConstCharArrayDetector<T>::length);
2891 template<
typename T> [[nodiscard]]
2892 typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::Type
2893 replaceAll(T & from, OUStringLiteral
const & to)
const {
2894 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(from));
2895 rtl_uString * s =
nullptr;
2898 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(from),
2899 libreoffice_internal::ConstCharArrayDetector<T>::length, to.data,
2904 template<
typename T> [[nodiscard]]
2906 libreoffice_internal::ConstCharArrayDetector<T, OUString >::TypeUtf16
2907 replaceAll(OUStringLiteral
const & from, T & to)
const {
2908 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(to));
2909 rtl_uString * s =
nullptr;
2911 &s, pData, from.data, from.size,
2912 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2913 libreoffice_internal::ConstCharArrayDetector<T>::length);
2917 template<
typename T> [[nodiscard]]
2919 libreoffice_internal::ConstCharArrayDetector<T, OUString >::TypeUtf16
2920 replaceAll(T & from, OUStringLiteral
const & to)
const {
2921 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(from));
2922 rtl_uString * s =
nullptr;
2925 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(from),
2926 libreoffice_internal::ConstCharArrayDetector<T>::length, to.data,
2944 rtl_uString* pNew = NULL;
2961 rtl_uString* pNew = NULL;
2981 rtl_uString* pNew = NULL;
3012 rtl_uString * pNew = NULL;
3032 return getToken(count, separator, n);
3056 return pData->buffer[0];
3167 rtl_uString * pNew = NULL;
3170 throw std::bad_alloc();
3203 sal_uInt32 *pInfo = NULL )
3205 rtl_uString * pNew = NULL;
3207 convertFlags, pInfo );
3209 throw std::bad_alloc();
3239 sal_uInt32 nFlags)
const 3242 pData->length, nEncoding, nFlags);
3297 sal_Int32 * indexUtf16, sal_Int32 incrementCodePoints = 1)
const 3300 pData, indexUtf16, incrementCodePoints);
3361 rtl_uString* pNewData = NULL;
3369 return number( static_cast< unsigned long long >( i ), radix );
3375 return number( static_cast< long long >( i ), radix );
3381 return number( static_cast< unsigned long long >( i ), radix );
3388 rtl_uString* pNewData = NULL;
3397 rtl_uString* pNewData = NULL;
3414 rtl_uString* pNewData = NULL;
3431 rtl_uString* pNewData = NULL;
3466 rtl_uString* pNewData = NULL;
3495 return number( i, radix );
3510 return number( ll, radix );
3558 rtl_uString* pNew = NULL;
3563 #if defined LIBO_INTERNAL_ONLY 3564 operator std::u16string_view()
const {
return {getStr(), sal_uInt32(getLength())}; }
3568 OUString & internalAppend( rtl_uString* pOtherData )
3570 rtl_uString* pNewData = NULL;
3572 if (pNewData == NULL) {
3573 throw std::bad_alloc();
3582 #if defined LIBO_INTERNAL_ONLY 3588 void operator ==(OUString
const &, std::nullptr_t) =
delete;
3589 void operator ==(std::nullptr_t, OUString
const &) =
delete;
3590 void operator !=(OUString
const &, std::nullptr_t) =
delete;
3591 void operator !=(std::nullptr_t, OUString
const &) =
delete;
3594 #if defined LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 3601 struct ToStringHelper< OUString >
3603 static int length(
const OUString& s ) {
return s.getLength(); }
3604 static sal_Unicode* addData(
sal_Unicode* buffer,
const OUString& s ) {
return addDataHelper( buffer, s.getStr(), s.getLength()); }
3605 static const bool allowOStringConcat =
false;
3606 static const bool allowOUStringConcat =
true;
3613 struct ToStringHelper< OUStringLiteral >
3615 static int length(
const OUStringLiteral& str ) {
return str.size; }
3616 static sal_Unicode* addData(
sal_Unicode* buffer,
const OUStringLiteral& str ) {
return addDataLiteral( buffer, str.data, str.size ); }
3617 static const bool allowOStringConcat =
false;
3618 static const bool allowOUStringConcat =
true;
3624 template<
typename charT,
typename traits,
typename T1,
typename T2 >
3625 inline std::basic_ostream<charT, traits> &
operator <<(
3626 std::basic_ostream<charT, traits> & stream, OUStringConcat< T1, T2 >&& concat)
3628 return stream << OUString( std::move(concat) );
3651 {
return static_cast<size_t>(rString.
hashCode()); }
3714 template<
typename charT,
typename traits >
3716 std::basic_ostream<charT, traits> & stream,
OUString const & rString)
3726 #ifdef RTL_STRING_UNITTEST 3729 typedef rtlunittest::OUString OUString;
3736 #if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST 3737 using ::rtl::OUString;
3738 using ::rtl::OUStringHash;
3741 using ::rtl::OUStringLiteral;
3742 using ::rtl::OUStringLiteral1;
3751 #if defined LIBO_INTERNAL_ONLY 3758 {
return std::size_t(s.
hashCode()); }
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.
static OUString boolean(bool b)
Returns the string representation of the boolean argument.
Definition: ustring.hxx:3463
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:1325
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:3373
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.
OUString intern() const
Return a canonical representation for a string.
Definition: ustring.hxx:3165
sal_Int32 compareToAscii(const sal_Char *asciiStr) const
Compares two strings.
Definition: ustring.hxx:1049
sal_Int32 lastIndexOf(sal_Unicode ch) const
Returns the index within this string of the last occurrence of the specified character,...
Definition: ustring.hxx:1973
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.
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.
static OUString const & unacquired(rtl_uString *const *ppHandle)
Provides an OUString const & passing a storage pointer of an rtl_uString * handle.
Definition: ustring.hxx:443
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:2273
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:3673
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:2710
sal_uInt16 rtl_TextEncoding
The various supported text encodings.
Definition: textenc.h:33
sal_Int32 lastIndexOf(const OUString &str) const
Returns the index within this string of the last occurrence of the specified substring,...
Definition: ustring.hxx:2113
OUString(rtl_uString *str)
New string from OUString data.
Definition: ustring.hxx:175
Dummy Type
Definition: stringutils.hxx:241
#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.
void clear()
Clears the string, i.e, makes a zero-character string.
Definition: ustring.hxx:641
bool convertToString(OString *pTarget, rtl_TextEncoding nEncoding, sal_uInt32 nFlags) const
Converts to an OString, signalling failure.
Definition: ustring.hxx:3238
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.
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:992
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.
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:255
SAL_DLLPUBLIC sal_Bool rtl_ustr_toBoolean(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Interpret a string as a boolean.
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:2942
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.
bool endsWith(OUString const &str, OUString *rest=NULL) const
Check whether this string ends with a given substring.
Definition: ustring.hxx:1495
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:2414
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_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.
OUString(sal_uInt32 const *codePoints, sal_Int32 codePointCount)
Create a new string from an array of Unicode code points.
Definition: ustring.hxx:384
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:922
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_Int32 getLength() const
Returns the length of this string.
Definition: string.hxx:405
#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.
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:3394
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:858
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.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfFloat(sal_Unicode *str, float f) SAL_THROW_EXTERN_C()
Create the string representation of a float.
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.
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
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:1902
Definition: bootstrap.hxx:29
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:1990
static OUString number(float f)
Returns the string representation of the float argument.
Definition: ustring.hxx:3411
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:1613
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.
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:1705
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.
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator!=(const OUString &rString, T &literal)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1778
sal_Int32 hashCode() const
Returns a hashcode for this string.
Definition: ustring.hxx:1940
bool equalsIgnoreAsciiCaseAscii(const sal_Char *asciiStr) const
Perform a ASCII lowercase comparison of two strings.
Definition: ustring.hxx:1174
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:2023
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:2736
#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.
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:3379
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:3200
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.
sal_Int32 reverseCompareToAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength) const
Compares two strings in reverse order.
Definition: ustring.hxx:1103
SAL_WARN_UNUSED_RESULT OUString copy(sal_Int32 beginIndex) const
Returns a new string that is a substring of this string.
Definition: ustring.hxx:2212
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:357
static OUString fromUtf8(const OString &rSource)
Convert an OString to an OUString, assuming that the OString is UTF-8-encoded.
Definition: ustring.hxx:3312
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.
#define RTL_TEXTENCODING_UTF8
Definition: textenc.h:113
#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:465
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:578
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:1408
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:1289
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.
friend OUString operator+(const OUString &rStr1, const OUString &rStr2)
Definition: ustring.hxx:2254
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:138
OUString()
New string containing no characters.
Definition: ustring.hxx:136
OUString getToken(sal_Int32 count, sal_Unicode separator) const
Returns a token from the string.
Definition: ustring.hxx:3030
OUString(sal_Unicode value)
New string from a single Unicode character.
Definition: ustring.hxx:197
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_Int64 toInt64(sal_Int16 radix=10) const
Returns the int64 value from this string.
Definition: ustring.hxx:3101
#define RTL_USTR_MAX_VALUEOFBOOLEAN
Definition: ustring.h:915
bool endsWithAsciiL(char const *asciiStr, sal_Int32 asciiStrLength) const
Check whether this string ends with a given ASCII string.
Definition: ustring.hxx:1584
OUString(const sal_Unicode *value)
New string from a Unicode character buffer array.
Definition: ustring.hxx:219
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfDouble(sal_Unicode *str, double d) SAL_THROW_EXTERN_C()
Create the string representation of a double.
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:1332
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:3367
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.
bool match(const OUString &str, sal_Int32 fromIndex=0) const
Match against a substring appearing in this string.
Definition: ustring.hxx:910
sal_Unicode toChar() const
Returns the first character from this string.
Definition: ustring.hxx:3054
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.
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.
bool equalsAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength) const
Perform a comparison of two strings.
Definition: ustring.hxx:1147
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:1630
OString toUtf8() const
Convert this string to an OString, assuming that the string can be UTF-8-encoded successfully.
Definition: ustring.hxx:3335
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:756
SAL_WARN_UNUSED_RESULT OUString concat(const OUString &str) const
Concatenates the specified string to the end of this string.
Definition: ustring.hxx:2246
Definition: stringutils.hxx:146
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:2010
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.
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:3296
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.
OUString getToken(sal_Int32 token, sal_Unicode cTok, sal_Int32 &index) const
Returns a token in the string.
Definition: ustring.hxx:3010
sal_uInt16 sal_Unicode
Definition: types.h:141
OUString(const sal_Unicode *value, sal_Int32 length)
New string from a Unicode character buffer array.
Definition: ustring.hxx:233
bool toBoolean() const
Returns the Boolean value from this string.
Definition: ustring.hxx:3043
OUString & operator=(const OUString &str)
Assign a new string.
Definition: ustring.hxx:451
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:132
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:2136
unsigned char sal_Bool
Definition: types.h:38
__sal_NoAcquire
Definition: types.h:370
sal_uInt32 toUInt32(sal_Int16 radix=10) const
Returns the uint32 value from this string.
Definition: ustring.hxx:3086
static OUString createFromAscii(const sal_Char *value)
Returns a OUString copied without conversion from an ASCII character string.
Definition: ustring.hxx:3556
A helper to use OUStrings with hash maps.
Definition: ustring.hxx:3639
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:979
bool isEmpty() const
Checks if a string is empty.
Definition: ustring.hxx:664
bool equalsIgnoreAsciiCase(const OUString &str) const
Perform a ASCII lowercase comparison of two strings.
Definition: ustring.hxx:820
const sal_Char * getStr() const SAL_RETURNS_NONNULL
Returns a pointer to the characters of this string.
Definition: string.hxx:431
#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.
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:2148
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.
bool operator>(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:100
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:2685
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator==(const OUString &rString, T &literal)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1746
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:2231
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.
bool startsWith(OUString const &str, OUString *rest=NULL) const
Check whether this string starts with a given substring.
Definition: ustring.hxx:1318
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator==(T &literal, const OUString &rString)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1762
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:2196
bool operator<(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:90
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:2318
sal_Int32 compareTo(const OUString &str) const
Compares two strings.
Definition: ustring.hxx:705
float toFloat() const
Returns the float value from this string.
Definition: ustring.hxx:3131
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.
static OUString number(double d)
Returns the string representation of the double argument.
Definition: ustring.hxx:3428
definition of a no acquire enum for ctors
Definition: types.h:374
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.
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_Int32 toInt32(sal_Int16 radix=10) const
Returns the int32 value from this string.
Definition: ustring.hxx:3069
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfBoolean(sal_Unicode *str, sal_Bool b) SAL_THROW_EXTERN_C()
Create the string representation of a boolean.
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.
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator!=(T &literal, const OUString &rString)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1794
OUString & operator+=(const OUString &str)
Append a string to this string.
Definition: ustring.hxx:553
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:3697
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_Int32 reverseCompareTo(const OUString &str) const
Compares two strings in reverse order.
Definition: ustring.hxx:744
This String class provide base functionality for C++ like 8-Bit character array handling.
Definition: string.hxx:97
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 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:2347
sal_Int32 compareToIgnoreAsciiCaseAscii(const sal_Char *asciiStr) const
Compares two ASCII strings ignoring case.
Definition: ustring.hxx:1197
sal_Int32 getLength() const
Returns the length of this string.
Definition: ustring.hxx:654
#define SAL_WARN_UNUSED_RESULT
Use this as markup for functions and methods whose return value must be checked.
Definition: types.h:302
char sal_Char
A legacy synonym for char.
Definition: types.h:120
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:1251
#define RTL_USTR_MAX_VALUEOFFLOAT
Definition: ustring.h:1022
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:2663
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:1958
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:3385
sal_uInt64 toUInt64(sal_Int16 radix=10) const
Returns the uint64 value from this string.
Definition: ustring.hxx:3118
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 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 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:2293
double toDouble() const
Returns the double value from this string.
Definition: ustring.hxx:3144
#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.
const sal_Unicode * getStr() const SAL_RETURNS_NONNULL
Returns a pointer to the Unicode character buffer for this string.
Definition: ustring.hxx:676
This String class provides base functionality for C++ like Unicode character array handling.
Definition: ustring.hxx:126
Dummy Type
Definition: stringutils.hxx:263
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.
size_t operator()(const OUString &rString) const
Compute a hash code for a string.
Definition: ustring.hxx:3650
bool equals(const OUString &str) const
Perform a comparison of two strings.
Definition: ustring.hxx:796
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 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 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_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.
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:1511
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.
bool operator==(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:110
bool equalsAscii(const sal_Char *asciiStr) const
Perform a comparison of two strings.
Definition: ustring.hxx:1124
~OUString()
Release the string data.
Definition: ustring.hxx:427
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_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:2082
SAL_DLLPUBLIC void rtl_uString_release(rtl_uString *str) SAL_THROW_EXTERN_C() SAL_HOT
Decrement the reference count of a string.
OUString(rtl_uString *str, __sal_NoAcquire)
New OUString from OUString data without acquiring it.
Definition: ustring.hxx:189
sal_Int32 compareTo(const OUString &str, sal_Int32 maxLength) const
Compares two strings with a maximum count of characters.
Definition: ustring.hxx:726
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_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.
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:2380
#define OSTRING_TO_OUSTRING_CVTFLAGS
Definition: ustring.h:2120
static OUString number(int i, sal_Int16 radix=10)
Returns the string representation of the integer argument.
Definition: ustring.hxx:3358
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.
OUString(const OUString &str)
New string from OUString.
Definition: ustring.hxx:147
Definition: stringutils.hxx:103
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.
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:489
sal_Int32 compareToIgnoreAsciiCase(const OUString &str) const
Perform a ASCII lowercase comparison of two strings.
Definition: ustring.hxx:845
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.
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.
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:2979
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:1425
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:2959
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.
bool equalsIgnoreAsciiCaseAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength) const
Perform an ASCII lowercase comparison of two strings.
Definition: ustring.hxx:1222
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.