20 #ifndef INCLUDED_RTL_USTRING_HXX 21 #define INCLUDED_RTL_USTRING_HXX 38 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 39 #include "config_global.h" 43 #ifdef RTL_STRING_UNITTEST 44 extern bool rtl_string_unittest_invalid_conversion;
52 #ifdef RTL_STRING_UNITTEST 53 #define rtl rtlunittest 59 #ifdef RTL_STRING_UNITTEST 63 #if defined LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 74 template<
typename T> constexpr OUStringLiteral(
76 typename libreoffice_internal::ConstCharArrayDetector<
77 T, libreoffice_internal::Dummy>::Type
78 = libreoffice_internal::Dummy()):
79 size(libreoffice_internal::ConstCharArrayDetector<T>::length),
81 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(literal))
83 #if HAVE_CXX14_CONSTEXPR 85 libreoffice_internal::ConstCharArrayDetector<T>::isValid(literal));
148 #ifndef _MSC_VER // TODO? 149 #if defined LIBO_INTERNAL_ONLY 198 #if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST_CONCAT 249 template<
typename T >
264 #ifdef RTL_STRING_UNITTEST 265 rtl_string_unittest_const_literal =
true;
269 #if defined LIBO_INTERNAL_ONLY 283 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(
285 libreoffice_internal::ConstCharArrayDetector<T>::length);
290 #ifdef RTL_STRING_UNITTEST 295 template<
typename T >
300 rtl_string_unittest_invalid_conversion =
true;
306 template<
typename T >
311 rtl_string_unittest_invalid_conversion =
true;
315 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 332 OUString(OUStringLiteral literal): pData(NULL) {
359 throw std::bad_alloc();
380 sal_uInt32
const * codePoints, sal_Int32 codePointCount):
385 throw std::bad_alloc();
389 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 394 template<
typename T1,
typename T2 >
395 OUString( OUStringConcat< T1, T2 >&& c )
397 const sal_Int32 l = c.length();
429 {
return *
reinterpret_cast< OUString const *
>( ppHandle ); }
442 #ifndef _MSC_VER // TODO? 443 #if defined LIBO_INTERNAL_ONLY 473 template<
typename T >
490 #if defined LIBO_INTERNAL_ONLY 495 operator =(T & literal) {
501 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(
503 libreoffice_internal::ConstCharArrayDetector<T>::length);
509 OUString & operator =(OUStringLiteral
const & literal) {
510 if (literal.size == 0) {
527 #if defined LIBO_INTERNAL_ONLY 531 rtl_uString* pNewData = NULL;
533 if (pNewData == NULL) {
534 throw std::bad_alloc();
540 #if defined LIBO_INTERNAL_ONLY 541 void operator+=(
OUString const &) && =
delete;
552 operator +=(T & literal)
553 #if defined LIBO_INTERNAL_ONLY 565 #if defined LIBO_INTERNAL_ONLY 568 operator +=(T &) && =
delete;
571 #if defined LIBO_INTERNAL_ONLY 576 operator +=(T & literal) & {
585 libreoffice_internal::ConstCharArrayDetector<T, OUString &>::TypeUtf16
586 operator +=(T &) && =
delete;
589 OUString & operator +=(OUStringLiteral
const & literal) & {
593 void operator +=(OUStringLiteral
const &) && =
delete;
596 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 601 template<
typename T1,
typename T2 >
602 OUString& operator+=( OUStringConcat< T1, T2 >&& c ) & {
603 sal_Int32 l = c.length();
608 sal_Unicode* end = c.addData( pData->buffer + pData->length );
613 template<
typename T1,
typename T2>
void operator +=(
614 OUStringConcat<T1, T2> &&) && =
delete;
646 return pData->length == 0;
669 assert(index >= 0 && static_cast<sal_uInt32>(index) < static_cast<sal_uInt32>(getLength()));
670 return getStr()[index];
688 str.pData->buffer, str.pData->length );
709 str.pData->buffer, str.pData->length, maxLength );
727 str.pData->buffer, str.pData->length );
735 template<
typename T >
741 pData->buffer, pData->length,
746 #if defined LIBO_INTERNAL_ONLY 751 reverseCompareTo(T & literal)
const {
753 pData->buffer, pData->length,
759 sal_Int32 reverseCompareTo(OUStringLiteral
const & literal)
const {
761 pData->buffer, pData->length, literal.data, literal.size);
778 if ( pData->length != str.pData->length )
780 if ( pData == str.pData )
783 str.pData->buffer, str.pData->length ) == 0;
802 if ( pData->length != str.pData->length )
804 if ( pData == str.pData )
807 str.pData->buffer, str.pData->length ) == 0;
828 str.pData->buffer, str.pData->length );
837 template<
typename T >
846 pData->buffer, pData->length,
852 #if defined LIBO_INTERNAL_ONLY 856 equalsIgnoreAsciiCase(T & literal)
const {
859 pData->buffer, pData->length,
867 bool equalsIgnoreAsciiCase(OUStringLiteral
const & literal)
const {
868 return pData->length == literal.size
870 pData->buffer, pData->length, literal.data)
893 str.pData->buffer, str.pData->length, str.pData->length ) == 0;
901 template<
typename T >
908 pData->buffer+fromIndex, pData->length-fromIndex,
915 #if defined LIBO_INTERNAL_ONLY 919 match(T & literal, sal_Int32 fromIndex = 0)
const {
920 assert(fromIndex >= 0);
923 pData->buffer + fromIndex, pData->length - fromIndex,
932 bool match(OUStringLiteral
const & literal, sal_Int32 fromIndex = 0)
const {
935 pData->buffer + fromIndex, pData->length - fromIndex,
936 literal.data, literal.size)
962 str.pData->buffer, str.pData->length,
963 str.pData->length ) == 0;
971 template<
typename T >
978 pData->buffer+fromIndex, pData->length-fromIndex,
985 #if defined LIBO_INTERNAL_ONLY 989 matchIgnoreAsciiCase(T & literal, sal_Int32 fromIndex = 0)
const {
990 assert(fromIndex >= 0);
993 pData->buffer + fromIndex, pData->length - fromIndex,
1002 bool matchIgnoreAsciiCase(
1003 OUStringLiteral
const & literal, sal_Int32 fromIndex = 0)
const 1007 pData->buffer+fromIndex, pData->length-fromIndex, literal.data,
1057 "replace s1.compareToAscii(s2, strlen(s2)) == 0 with s1.startsWith(s2)")
1058 sal_Int32 compareToAscii( const
sal_Char * asciiStr, sal_Int32 maxLength )
const 1061 asciiStr, maxLength );
1086 asciiStr, asciiStrLength );
1129 if ( pData->length != asciiStrLength )
1133 pData->buffer, asciiStr, asciiStrLength );
1204 if ( pData->length != asciiStrLength )
1234 asciiStr, asciiStrLength ) == 0;
1241 #if SAL_TYPES_SIZEOFLONG == 8 1272 asciiStr, asciiStrLength ) == 0;
1279 #if SAL_TYPES_SIZEOFLONG == 8 1299 bool b = match(str);
1300 if (b && rest != NULL) {
1311 template<
typename T >
1313 T & literal,
OUString * rest = NULL)
const 1319 <= sal_uInt32(pData->length))
1325 if (b && rest != NULL) {
1332 #if defined LIBO_INTERNAL_ONLY 1334 template<
typename T>
1336 startsWith(T & literal,
OUString * rest =
nullptr)
const {
1339 <= sal_uInt32(pData->length))
1347 if (b && rest !=
nullptr) {
1355 bool startsWith(OUStringLiteral
const & literal, OUString * rest =
nullptr)
1358 bool b = literal.size <= pData->length
1360 pData->buffer, literal.data, literal.size);
1361 if (b && rest !=
nullptr) {
1362 *rest = copy(literal.size);
1391 bool b = matchIgnoreAsciiCase(str);
1392 if (b && rest != NULL) {
1403 template<
typename T >
1417 if (b && rest != NULL) {
1424 #if defined LIBO_INTERNAL_ONLY 1426 template<
typename T>
1428 startsWithIgnoreAsciiCase(T & literal,
OUString * rest =
nullptr)
const {
1431 <= sal_uInt32(pData->length))
1439 if (b && rest !=
nullptr) {
1447 bool startsWithIgnoreAsciiCase(
1448 OUStringLiteral
const & literal, OUString * rest =
nullptr)
const 1452 pData->buffer, literal.size, literal.data, literal.size)
1454 if (b && rest !=
nullptr) {
1455 *rest = copy(literal.size);
1477 && match(str, getLength() - str.
getLength());
1478 if (b && rest != NULL) {
1479 *rest = copy(0, getLength() - str.
getLength());
1489 template<
typename T >
1497 <= sal_uInt32(pData->length))
1499 (pData->buffer + pData->length
1504 if (b && rest != NULL) {
1513 #if defined LIBO_INTERNAL_ONLY 1515 template<
typename T>
1517 endsWith(T & literal,
OUString * rest =
nullptr)
const {
1520 <= sal_uInt32(pData->length))
1522 (pData->buffer + pData->length
1529 if (b && rest !=
nullptr) {
1539 bool endsWith(OUStringLiteral
const & literal, OUString * rest =
nullptr)
1542 bool b = literal.size <= pData->length
1544 pData->buffer + pData->length - literal.size,
1545 literal.data, literal.size);
1546 if (b && rest !=
nullptr) {
1547 *rest = copy(0, (getLength() - literal.size));
1567 return asciiStrLength <= pData->length
1569 pData->buffer + pData->length - asciiStrLength, asciiStr,
1596 && matchIgnoreAsciiCase(str, getLength() - str.
getLength());
1597 if (b && rest != NULL) {
1598 *rest = copy(0, getLength() - str.
getLength());
1608 template<
typename T >
1616 <= sal_uInt32(pData->length))
1618 (pData->buffer + pData->length
1625 if (b && rest != NULL) {
1634 #if defined LIBO_INTERNAL_ONLY 1636 template<
typename T>
1638 endsWithIgnoreAsciiCase(T & literal,
OUString * rest =
nullptr)
const {
1641 <= sal_uInt32(pData->length))
1643 (pData->buffer + pData->length
1650 if (b && rest !=
nullptr) {
1660 bool endsWithIgnoreAsciiCase(
1661 OUStringLiteral
const & literal, OUString * rest =
nullptr)
const 1663 bool b = literal.size <= pData->length
1665 pData->buffer + pData->length - literal.size,
1666 literal.size, literal.data, literal.size)
1668 if (b && rest !=
nullptr) {
1669 *rest = copy(0, getLength() - literal.size);
1686 char const * asciiStr, sal_Int32 asciiStrLength)
const 1688 return asciiStrLength <= pData->length
1690 pData->buffer + pData->length - asciiStrLength,
1691 asciiStrLength, asciiStr, asciiStrLength)
1696 {
return rStr1.
equals(rStr2); }
1698 {
return rStr1.
compareTo( pStr2 ) == 0; }
1710 {
return rStr1.
compareTo( rStr2 ) < 0; }
1712 {
return rStr1.
compareTo( rStr2 ) > 0; }
1714 {
return rStr1.
compareTo( rStr2 ) <= 0; }
1716 {
return rStr1.
compareTo( rStr2 ) >= 0; }
1725 template<
typename T >
1741 template<
typename T >
1757 template<
typename T >
1773 template<
typename T >
1783 #if defined LIBO_INTERNAL_ONLY 1789 string.pData->buffer,
string.pData->length,
1796 template<
typename T>
friend typename libreoffice_internal::ConstCharArrayDetector<T, bool>::TypeUtf16
1800 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(
1802 libreoffice_internal::ConstCharArrayDetector<T>::length,
1803 string.pData->buffer,
string.pData->length)
1807 template<
typename T>
friend typename libreoffice_internal::ConstCharArrayDetector<T, bool>::TypeUtf16
1811 string.pData->buffer,
string.pData->length,
1812 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(
1814 libreoffice_internal::ConstCharArrayDetector<T>::length)
1818 template<
typename T>
friend typename libreoffice_internal::ConstCharArrayDetector<T, bool>::TypeUtf16
1822 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(
1824 libreoffice_internal::ConstCharArrayDetector<T>::length,
1825 string.pData->buffer,
string.pData->length)
1830 #if defined LIBO_INTERNAL_ONLY 1838 friend bool operator ==(OUString
const & lhs, OUStringLiteral
const & rhs) {
1839 return lhs.equalsAsciiL(rhs.data, rhs.size);
1842 friend bool operator !=(OUString
const & lhs, OUStringLiteral
const & rhs) {
1843 return !lhs.equalsAsciiL(rhs.data, rhs.size);
1846 friend bool operator <(OUString
const & lhs, OUStringLiteral
const & rhs) {
1849 lhs.pData->buffer, lhs.pData->length, rhs.data))
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 ==(OUStringLiteral
const & lhs, OUString
const & rhs) {
1875 return rhs.equalsAsciiL(lhs.data, lhs.size);
1878 friend bool operator !=(OUStringLiteral
const & lhs, OUString
const & rhs) {
1879 return !rhs.equalsAsciiL(lhs.data, lhs.size);
1882 friend bool operator <(OUStringLiteral
const & lhs, OUString
const & rhs) {
1885 rhs.pData->buffer, rhs.pData->length, lhs.data))
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))
1941 return (ret < 0 ? ret : ret+fromIndex);
1993 str.pData->buffer, str.pData->length );
1994 return (ret < 0 ? ret : ret+fromIndex);
2002 template<
typename T >
2008 pData->buffer + fromIndex, pData->length - fromIndex,
2011 return n < 0 ? n : n + fromIndex;
2014 #if defined LIBO_INTERNAL_ONLY 2016 template<
typename T>
2019 indexOf(T & literal, sal_Int32 fromIndex = 0)
const {
2020 assert(fromIndex >= 0);
2022 pData->buffer + fromIndex, pData->length - fromIndex,
2025 return n < 0 ? n : n + fromIndex;
2029 sal_Int32 indexOf(OUStringLiteral
const & literal, sal_Int32 fromIndex = 0)
2033 pData->buffer + fromIndex, pData->length - fromIndex, literal.data,
2035 return n < 0 ? n : n + fromIndex;
2063 char const * str, sal_Int32 len, sal_Int32 fromIndex = 0)
const 2066 pData->buffer + fromIndex, pData->length - fromIndex, str, len);
2067 return ret < 0 ? ret : ret + fromIndex;
2074 #if SAL_TYPES_SIZEOFLONG == 8 2096 str.pData->buffer, str.pData->length );
2119 str.pData->buffer, str.pData->length );
2127 template<
typename T >
2133 pData->buffer, pData->length,
2138 #if defined LIBO_INTERNAL_ONLY 2140 template<
typename T>
2143 lastIndexOf(T & literal)
const {
2145 pData->buffer, pData->length,
2151 sal_Int32 lastIndexOf(OUStringLiteral
const & literal)
const {
2153 pData->buffer, pData->length, literal.data, literal.size);
2179 pData->buffer, pData->length, str, len);
2194 rtl_uString *pNew = NULL;
2213 rtl_uString *pNew = NULL;
2228 rtl_uString* pNew = NULL;
2233 #ifndef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 2236 return rStr1.
concat( rStr2 );
2255 rtl_uString* pNew = NULL;
2275 rtl_uString* pNew = NULL;
2299 OUString const & from,
OUString const & to, sal_Int32 * index = NULL)
const 2301 rtl_uString * s = NULL;
2304 &s, pData, from.pData, to.pData, index == NULL ? &i : index);
2326 template<
typename T >
2328 sal_Int32 * index = NULL)
const 2331 rtl_uString * s = NULL;
2337 index == NULL ? &i : index);
2359 template<
typename T >
2361 sal_Int32 * index = NULL)
const 2364 rtl_uString * s = NULL;
2367 &s, pData, from.pData,
2370 index == NULL ? &i : index);
2392 template<
typename T1,
typename T2 >
2398 rtl_uString * s = NULL;
2406 index == NULL ? &i : index);
2410 #if defined LIBO_INTERNAL_ONLY 2415 replaceFirst(T & from,
OUString const & to, sal_Int32 * index =
nullptr)
2418 rtl_uString * s =
nullptr;
2424 to.pData->buffer, to.pData->length, index ==
nullptr ? &i : index);
2426 throw std::bad_alloc();
2434 libreoffice_internal::ConstCharArrayDetector<T, OUString>::TypeUtf16
2435 replaceFirst(OUString
const & from, T & to, sal_Int32 * index =
nullptr)
2438 rtl_uString * s =
nullptr;
2441 &s, pData, from.pData->buffer, from.pData->length,
2442 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2443 libreoffice_internal::ConstCharArrayDetector<T>::length,
2444 index ==
nullptr ? &i : index);
2446 throw std::bad_alloc();
2454 libreoffice_internal::ConstCharArrayDetector<
2456 typename libreoffice_internal::ConstCharArrayDetector<
2457 T2, OUString>::TypeUtf16
2459 replaceFirst(T1 & from, T2 & to, sal_Int32 * index =
nullptr)
const {
2460 rtl_uString * s =
nullptr;
2464 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2465 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2466 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2467 libreoffice_internal::ConstCharArrayDetector<T2>::length,
2468 index ==
nullptr ? &i : index);
2470 throw std::bad_alloc();
2478 libreoffice_internal::ConstCharArrayDetector<
2480 typename libreoffice_internal::ConstCharArrayDetector<
2483 replaceFirst(T1 & from, T2 & to, sal_Int32 * index =
nullptr)
const {
2484 rtl_uString * s =
nullptr;
2488 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2489 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2490 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2491 libreoffice_internal::ConstCharArrayDetector<T2>::length,
2492 index ==
nullptr ? &i : index);
2494 throw std::bad_alloc();
2502 libreoffice_internal::ConstCharArrayDetector<
2504 typename libreoffice_internal::ConstCharArrayDetector<
2505 T2, OUString>::TypeUtf16
2507 replaceFirst(T1 & from, T2 & to, sal_Int32 * index =
nullptr)
const {
2508 rtl_uString * s =
nullptr;
2512 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2513 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2514 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2515 libreoffice_internal::ConstCharArrayDetector<T2>::length,
2516 index ==
nullptr ? &i : index);
2518 throw std::bad_alloc();
2526 OUStringLiteral
const & from, OUString
const & to,
2527 sal_Int32 * index =
nullptr)
const 2529 rtl_uString * s =
nullptr;
2532 &s, pData, from.data, from.size, to.pData,
2533 index ==
nullptr ? &i : index);
2538 OUString
const & from, OUStringLiteral
const & to,
2539 sal_Int32 * index =
nullptr)
const 2541 rtl_uString * s =
nullptr;
2544 &s, pData, from.pData, to.data, to.size,
2545 index ==
nullptr ? &i : index);
2550 OUStringLiteral
const & from, OUStringLiteral
const & to,
2551 sal_Int32 * index =
nullptr)
const 2553 rtl_uString * s =
nullptr;
2556 &s, pData, from.data, from.size, to.data, to.size,
2557 index ==
nullptr ? &i : index);
2562 typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::Type
2564 OUStringLiteral
const & from, T & to, sal_Int32 * index =
nullptr)
const 2566 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(to));
2567 rtl_uString * s =
nullptr;
2570 &s, pData, from.data, from.size,
2571 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2572 libreoffice_internal::ConstCharArrayDetector<T>::length,
2573 index ==
nullptr ? &i : index);
2578 typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::Type
2580 T & from, OUStringLiteral
const & to, sal_Int32 * index =
nullptr)
const 2582 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(from));
2583 rtl_uString * s =
nullptr;
2587 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(from),
2588 libreoffice_internal::ConstCharArrayDetector<T>::length, to.data,
2589 to.size, index ==
nullptr ? &i : index);
2595 libreoffice_internal::ConstCharArrayDetector<T, OUString >::TypeUtf16
2597 OUStringLiteral
const & from, T & to, sal_Int32 * index =
nullptr)
const 2599 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(to));
2600 rtl_uString * s =
nullptr;
2603 &s, pData, from.data, from.size,
2604 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2605 libreoffice_internal::ConstCharArrayDetector<T>::length,
2606 index ==
nullptr ? &i : index);
2612 libreoffice_internal::ConstCharArrayDetector<T, OUString >::TypeUtf16
2614 T & from, OUStringLiteral
const & to, sal_Int32 * index =
nullptr)
const 2616 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(from));
2617 rtl_uString * s =
nullptr;
2621 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(from),
2622 libreoffice_internal::ConstCharArrayDetector<T>::length, to.data,
2623 to.size, index ==
nullptr ? &i : index);
2646 rtl_uString * s = NULL;
2664 template<
typename T >
2668 rtl_uString * s = NULL;
2689 template<
typename T >
2693 rtl_uString * s = NULL;
2695 &s, pData, from.pData,
2714 template<
typename T1,
typename T2 >
2720 rtl_uString * s = NULL;
2730 #if defined LIBO_INTERNAL_ONLY 2735 replaceAll(T & from,
OUString const & to)
const {
2736 rtl_uString * s =
nullptr;
2741 to.pData->buffer, to.pData->length);
2743 throw std::bad_alloc();
2751 libreoffice_internal::ConstCharArrayDetector<T, OUString>::TypeUtf16
2752 replaceAll(OUString
const & from, T & to)
const {
2753 rtl_uString * s =
nullptr;
2755 &s, pData, from.pData->buffer, from.pData->length,
2756 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2757 libreoffice_internal::ConstCharArrayDetector<T>::length);
2759 throw std::bad_alloc();
2767 libreoffice_internal::ConstCharArrayDetector<
2769 typename libreoffice_internal::ConstCharArrayDetector<
2770 T2, OUString>::TypeUtf16
2772 replaceAll(T1 & from, T2 & to)
const {
2773 rtl_uString * s =
nullptr;
2776 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2777 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2778 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2779 libreoffice_internal::ConstCharArrayDetector<T2>::length);
2781 throw std::bad_alloc();
2789 libreoffice_internal::ConstCharArrayDetector<
2791 typename libreoffice_internal::ConstCharArrayDetector<
2794 replaceAll(T1 & from, T2 & to)
const {
2795 rtl_uString * s =
nullptr;
2798 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2799 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2800 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2801 libreoffice_internal::ConstCharArrayDetector<T2>::length);
2803 throw std::bad_alloc();
2811 libreoffice_internal::ConstCharArrayDetector<
2813 typename libreoffice_internal::ConstCharArrayDetector<
2814 T2, OUString>::TypeUtf16
2816 replaceAll(T1 & from, T2 & to)
const {
2817 rtl_uString * s =
nullptr;
2820 libreoffice_internal::ConstCharArrayDetector<T1>::toPointer(from),
2821 libreoffice_internal::ConstCharArrayDetector<T1>::length,
2822 libreoffice_internal::ConstCharArrayDetector<T2>::toPointer(to),
2823 libreoffice_internal::ConstCharArrayDetector<T2>::length);
2825 throw std::bad_alloc();
2833 OUStringLiteral
const & from, OUString
const & to)
const 2835 rtl_uString * s =
nullptr;
2837 &s, pData, from.data, from.size, to.pData);
2842 OUString
const & from, OUStringLiteral
const & to)
const 2844 rtl_uString * s =
nullptr;
2846 &s, pData, from.pData, to.data, to.size);
2851 OUStringLiteral
const & from, OUStringLiteral
const & to)
const 2853 rtl_uString * s =
nullptr;
2855 &s, pData, from.data, from.size, to.data, to.size);
2860 typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::Type
2861 replaceAll(OUStringLiteral
const & from, T & to)
const {
2862 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(to));
2863 rtl_uString * s =
nullptr;
2865 &s, pData, from.data, from.size,
2866 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2867 libreoffice_internal::ConstCharArrayDetector<T>::length);
2872 typename libreoffice_internal::ConstCharArrayDetector<T, OUString >::Type
2873 replaceAll(T & from, OUStringLiteral
const & to)
const {
2874 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(from));
2875 rtl_uString * s =
nullptr;
2878 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(from),
2879 libreoffice_internal::ConstCharArrayDetector<T>::length, to.data,
2886 libreoffice_internal::ConstCharArrayDetector<T, OUString >::TypeUtf16
2887 replaceAll(OUStringLiteral
const & from, T & to)
const {
2888 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(to));
2889 rtl_uString * s =
nullptr;
2891 &s, pData, from.data, from.size,
2892 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(to),
2893 libreoffice_internal::ConstCharArrayDetector<T>::length);
2899 libreoffice_internal::ConstCharArrayDetector<T, OUString >::TypeUtf16
2900 replaceAll(T & from, OUStringLiteral
const & to)
const {
2901 assert(libreoffice_internal::ConstCharArrayDetector<T>::isValid(from));
2902 rtl_uString * s =
nullptr;
2905 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(from),
2906 libreoffice_internal::ConstCharArrayDetector<T>::length, to.data,
2924 rtl_uString* pNew = NULL;
2941 rtl_uString* pNew = NULL;
2961 rtl_uString* pNew = NULL;
2992 rtl_uString * pNew = NULL;
3012 return getToken(count, separator, n);
3036 return pData->buffer[0];
3147 rtl_uString * pNew = NULL;
3150 throw std::bad_alloc();
3183 sal_uInt32 *pInfo = NULL )
3185 rtl_uString * pNew = NULL;
3187 convertFlags, pInfo );
3189 throw std::bad_alloc();
3219 sal_uInt32 nFlags)
const 3222 pData->length, nEncoding, nFlags);
3277 sal_Int32 * indexUtf16, sal_Int32 incrementCodePoints = 1)
const 3280 pData, indexUtf16, incrementCodePoints);
3341 rtl_uString* pNewData = NULL;
3349 return number( static_cast< unsigned long long >( i ), radix );
3355 return number( static_cast< long long >( i ), radix );
3361 return number( static_cast< unsigned long long >( i ), radix );
3368 rtl_uString* pNewData = NULL;
3377 rtl_uString* pNewData = NULL;
3394 rtl_uString* pNewData = NULL;
3411 rtl_uString* pNewData = NULL;
3446 rtl_uString* pNewData = NULL;
3475 return number( i, radix );
3490 return number( ll, radix );
3538 rtl_uString* pNew = NULL;
3544 #if defined LIBO_INTERNAL_ONLY 3550 void operator ==(OUString
const &, std::nullptr_t) =
delete;
3551 void operator ==(std::nullptr_t, OUString
const &) =
delete;
3552 void operator !=(OUString
const &, std::nullptr_t) =
delete;
3553 void operator !=(std::nullptr_t, OUString
const &) =
delete;
3556 #if defined LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 3563 struct ToStringHelper< OUString >
3565 static int length(
const OUString& s ) {
return s.getLength(); }
3566 static sal_Unicode* addData(
sal_Unicode* buffer,
const OUString& s ) {
return addDataHelper( buffer, s.getStr(), s.getLength()); }
3567 static const bool allowOStringConcat =
false;
3568 static const bool allowOUStringConcat =
true;
3575 struct ToStringHelper< OUStringLiteral >
3577 static int length(
const OUStringLiteral& str ) {
return str.size; }
3578 static sal_Unicode* addData(
sal_Unicode* buffer,
const OUStringLiteral& str ) {
return addDataLiteral( buffer, str.data, str.size ); }
3579 static const bool allowOStringConcat =
false;
3580 static const bool allowOUStringConcat =
true;
3586 template<
typename charT,
typename traits,
typename T1,
typename T2 >
3587 inline std::basic_ostream<charT, traits> &
operator <<(
3588 std::basic_ostream<charT, traits> & stream, OUStringConcat< T1, T2 >&& concat)
3590 return stream << OUString( std::move(concat) );
3613 {
return static_cast<size_t>(rString.
hashCode()); }
3676 template<
typename charT,
typename traits >
3678 std::basic_ostream<charT, traits> & stream,
OUString const & rString)
3688 #ifdef RTL_STRING_UNITTEST 3691 typedef rtlunittest::OUString OUString;
3698 #if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST 3699 using ::rtl::OUString;
3700 using ::rtl::OUStringHash;
3703 using ::rtl::OUStringLiteral;
3704 using ::rtl::OUStringLiteral1;
3713 #if defined LIBO_INTERNAL_ONLY 3720 {
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.
Definition: stringutils.hxx:158
SAL_DLLPUBLIC void rtl_uString_newReplace(rtl_uString **newStr, rtl_uString *str, sal_Unicode oldChar, sal_Unicode newChar) SAL_THROW_EXTERN_C()
Create a new string by replacing all occurrences of a single character within another string...
#define OUSTRING_TO_OSTRING_CVTFLAGS
Definition: string.h:1324
bool toBoolean() const
Returns the Boolean value from this string.
Definition: ustring.hxx:3023
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.
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, for example).
Definition: string.hxx:1893
bool equals(const OUString &str) const
Perform a comparison of two strings.
Definition: ustring.hxx:776
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:2211
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.
sal_uInt32 toUInt32(sal_Int16 radix=10) const
Returns the uint32 value from this string.
Definition: ustring.hxx:3066
static OUString createFromAscii(const sal_Char *value)
Returns a OUString copied without conversion from an ASCII character string.
Definition: ustring.hxx:3536
sal_uInt16 rtl_TextEncoding
The various supported text encodings.
Definition: textenc.h:33
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:3359
~OUString()
Release the string data.
Definition: ustring.hxx:412
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:2062
#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.
OUString(rtl_uString *str, __sal_NoAcquire)
New OUString from OUString data without acquiring it.
Definition: ustring.hxx:184
float toFloat() const
Returns the float value from this string.
Definition: ustring.hxx:3111
SAL_WARN_UNUSED_RESULT OUString copy(sal_Int32 beginIndex) const
Returns a new string that is a substring of this string.
Definition: ustring.hxx:2192
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:352
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...
static OUString number(double d)
Returns the string representation of the double argument.
Definition: ustring.hxx:3408
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:2665
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.
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator==(const OUString &rString, T &literal)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1726
SAL_DLLPUBLIC sal_Bool rtl_ustr_toBoolean(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Interpret a string as a boolean.
static OUString number(int i, sal_Int16 radix=10)
Returns the string representation of the integer argument.
Definition: ustring.hxx:3338
bool startsWith(OUString const &str, OUString *rest=NULL) const
Check whether this string starts with a given substring.
Definition: ustring.hxx:1298
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...
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator==(T &literal, const OUString &rString)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1742
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...
bool operator==(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:116
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.
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:1269
OUString & operator+=(const OUString &str)
Append a string to this string.
Definition: ustring.hxx:526
#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.
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:2959
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...
bool operator<(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:96
bool equalsIgnoreAsciiCaseAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength) const
Perform an ASCII lowercase comparison of two strings.
Definition: ustring.hxx:1202
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.
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:3353
OUString intern() const
Return a canonical representation for a string.
Definition: ustring.hxx:3145
bool operator>(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:106
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
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:3347
sal_Unicode toChar() const
Returns the first character from this string.
Definition: ustring.hxx:3034
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.
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.
sal_Int32 toInt32(sal_Int16 radix=10) const
Returns the int32 value from this string.
Definition: ustring.hxx:3049
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:3365
#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.
A helper to use OUStrings with hash maps.
Definition: ustring.hxx:3601
double toDouble() const
Returns the double value from this string.
Definition: ustring.hxx:3124
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.
void clear()
Clears the string, i.e, makes a zero-character string.
Definition: ustring.hxx:621
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...
const sal_Unicode * getStr() const SAL_RETURNS_NONNULL
Returns a pointer to the Unicode character buffer for this string.
Definition: ustring.hxx:656
bool convertToString(OString *pTarget, rtl_TextEncoding nEncoding, sal_uInt32 nFlags) const
Converts to an OString, signalling failure.
Definition: ustring.hxx:3218
This String class provide base functionality for C++ like 8-Bit character array handling.
Definition: string.hxx:95
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
OUString(sal_uInt32 const *codePoints, sal_Int32 codePointCount)
Create a new string from an array of Unicode code points.
Definition: ustring.hxx:379
#define RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR
Definition: textcvt.h:71
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:2643
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.
sal_uInt64 toUInt64(sal_Int16 radix=10) const
Returns the uint64 value from this string.
Definition: ustring.hxx:3098
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 ...
Definition: ustring.hxx:902
#define SAL_DEPRECATED(message)
Use as follows: SAL_DEPRECATED("Don't use, it's evil.") void doit(int nPara);.
Definition: types.h:485
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:598
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.
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:3374
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.
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 ...
Definition: ustring.hxx:838
#define RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR
Definition: textcvt.h:138
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:959
bool isEmpty() const
Checks if a string is empty.
Definition: ustring.hxx:644
bool equalsIgnoreAsciiCase(const OUString &str) const
Perform a ASCII lowercase comparison of two strings.
Definition: ustring.hxx:800
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.
bool equalsAscii(const sal_Char *asciiStr) const
Perform a comparison of two strings.
Definition: ustring.hxx:1104
#define RTL_USTR_MAX_VALUEOFBOOLEAN
Definition: ustring.h:915
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 ...
Definition: ustring.hxx:2128
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_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...
static OUString number(float f)
Returns the string representation of the float argument.
Definition: ustring.hxx:3391
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...
This String class provides base functionality for C++ like Unicode character array handling...
Definition: ustring.hxx:121
OUString(const OUString &str)
New string from OUString.
Definition: ustring.hxx:142
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.
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 ...
Definition: ustring.hxx:1491
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator!=(const OUString &rString, T &literal)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1758
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:474
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 ...
Definition: ustring.hxx:1405
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.
sal_uInt16 sal_Unicode
Definition: types.h:141
sal_Int32 compareTo(const OUString &str) const
Compares two strings.
Definition: ustring.hxx:685
static OUString boolean(bool b)
Returns the string representation of the boolean argument.
Definition: ustring.hxx:3443
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:3180
sal_Int32 reverseCompareToAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength) const
Compares two strings in reverse order.
Definition: ustring.hxx:1083
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
unsigned char sal_Bool
Definition: types.h:38
__sal_NoAcquire
Definition: types.h:368
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:2253
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:3635
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator!=(T &literal, const OUString &rString)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1774
friend OUString operator+(const OUString &rStr1, const OUString &rStr2)
Definition: ustring.hxx:2234
Definition: stringutils.hxx:115
OUString(rtl_uString *str)
New string from OUString data.
Definition: ustring.hxx:170
sal_Int32 reverseCompareTo(const OUString &str) const
Compares two strings in reverse order.
Definition: ustring.hxx:724
Dummy Type
Definition: stringutils.hxx:204
#define RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
Definition: textcvt.h:68
SAL_DLLPUBLIC void rtl_uString_newToAsciiUpperCase(rtl_uString **newStr, rtl_uString *str) SAL_THROW_EXTERN_C()
Create a new string by converting all ASCII lowercase letters to uppercase within another string...
bool endsWithAsciiL(char const *asciiStr, sal_Int32 asciiStrLength) const
Check whether this string ends with a given ASCII string.
Definition: ustring.hxx:1564
OUString(const sal_Unicode *value)
New string from a Unicode character buffer array.
Definition: ustring.hxx:214
Definition: bootstrap.hxx:29
SAL_DLLPUBLIC sal_Int32 rtl_ustr_lastIndexOfChar_WithLength(const sal_Unicode *str, sal_Int32 len, sal_Unicode ch) SAL_THROW_EXTERN_C()
Search for the last occurrence of a character within a string.
sal_Int32 compareToAscii(const sal_Char *asciiStr) const
Compares two strings.
Definition: ustring.hxx:1029
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.
sal_Int32 lastIndexOf(sal_Unicode ch) const
Returns the index within this string of the last occurrence of the specified character, searching backward starting at the end.
Definition: ustring.hxx:1953
bool endsWith(OUString const &str, OUString *rest=NULL) const
Check whether this string ends with a given substring.
Definition: ustring.hxx:1475
OString toUtf8() const
Convert this string to an OString, assuming that the string can be UTF-8-encoded successfully.
Definition: ustring.hxx:3315
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:2273
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...
Dummy Type
Definition: stringutils.hxx:231
OUString & operator=(const OUString &str)
Assign a new string.
Definition: ustring.hxx:436
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 ...
Definition: ustring.hxx:972
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:3659
definition of a no acquire enum for ctors
Definition: types.h:372
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_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:2394
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:1593
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 hashCode() const
Returns a hashcode for this string.
Definition: ustring.hxx:1920
bool equalsIgnoreAsciiCaseAscii(const sal_Char *asciiStr) const
Perform a ASCII lowercase comparison of two strings.
Definition: ustring.hxx:1154
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfBoolean(sal_Unicode *str, sal_Bool b) SAL_THROW_EXTERN_C()
Create the string representation of a boolean.
libreoffice_internal::ConstCharArrayDetector< T, 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 ...
Definition: ustring.hxx:2003
SAL_DLLPUBLIC void rtl_uString_newReplaceFirstToAsciiL(rtl_uString **newStr, rtl_uString *str, rtl_uString const *from, char const *to, sal_Int32 toLength, sal_Int32 *index) SAL_THROW_EXTERN_C()
Create a new string by replacing the first occurrence of a given substring with another substring...
SAL_DLLPUBLIC sal_Int32 rtl_ustr_shortenedCompare_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Unicode *second, sal_Int32 secondLen, sal_Int32 shortenedLen) SAL_THROW_EXTERN_C()
Compare two strings with a maximum count of characters.
const sal_Char * getStr() const SAL_RETURNS_NONNULL
Returns a pointer to the characters of this string.
Definition: string.hxx:429
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_Int32 compareTo(const OUString &str, sal_Int32 maxLength) const
Compares two strings with a maximum count of characters.
Definition: ustring.hxx:706
static OUString fromUtf8(const OString &rSource)
Convert an OString to an OUString, assuming that the OString is UTF-8-encoded.
Definition: ustring.hxx:3292
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:2360
sal_Int32 lastIndexOf(sal_Unicode ch, sal_Int32 fromIndex) const
Returns the index within this string of the last occurrence of the specified character, searching backward starting before the specified index.
Definition: ustring.hxx:1970
#define SAL_WARN_UNUSED_RESULT
Use this as markup for functions and methods whose return value must be checked.
Definition: types.h:300
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:1685
char sal_Char
A legacy synonym for char.
Definition: types.h:120
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:2176
#define RTL_USTR_MAX_VALUEOFFLOAT
Definition: ustring.h:1022
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:2716
sal_Int32 compareToIgnoreAsciiCase(const OUString &str) const
Perform a ASCII lowercase comparison of two strings.
Definition: ustring.hxx:825
SAL_DLLPUBLIC void rtl_uString_newFromLiteral(rtl_uString **newStr, const sal_Char *value, sal_Int32 len, sal_Int32 allocExtra) SAL_THROW_EXTERN_C()
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:1388
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:2939
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...
OUString()
New string containing no characters.
Definition: ustring.hxx:131
OUString getToken(sal_Int32 count, sal_Unicode separator) const
Returns a token from the string.
Definition: ustring.hxx:3010
OUString(sal_Unicode value)
New string from a single Unicode character.
Definition: ustring.hxx:192
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:2298
#define RTL_USTR_MAX_VALUEOFDOUBLE
Definition: ustring.h:1041
SAL_DLLPUBLIC void rtl_uString_newReplaceStrAt(rtl_uString **newStr, rtl_uString *str, sal_Int32 idx, sal_Int32 count, rtl_uString *subStr) SAL_THROW_EXTERN_C()
Create a new string by replacing a substring of another string.
sal_Int64 toInt64(sal_Int16 radix=10) const
Returns the int64 value from this string.
Definition: ustring.hxx:3081
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.
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.
bool match(const OUString &str, sal_Int32 fromIndex=0) const
Match against a substring appearing in this string.
Definition: ustring.hxx:890
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.
size_t operator()(const OUString &rString) const
Compute a hash code for a string.
Definition: ustring.hxx:3612
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.
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.
static OUString const & unacquired(rtl_uString *const *ppHandle)
Provides an OUString const & passing a storage pointer of an rtl_uString * handle.
Definition: ustring.hxx:428
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:2690
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 ...
Definition: ustring.hxx:1610
SAL_WARN_UNUSED_RESULT OUString concat(const OUString &str) const
Concatenates the specified string to the end of this string.
Definition: ustring.hxx:2226
sal_Int32 lastIndexOf(const OUString &str) const
Returns the index within this string of the last occurrence of the specified substring, searching backward starting at the end.
Definition: ustring.hxx:2093
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:3276
OUString getToken(sal_Int32 token, sal_Unicode cTok, sal_Int32 &index) const
Returns a token in the string.
Definition: ustring.hxx:2990
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:2327
SAL_DLLPUBLIC sal_uInt64 rtl_ustr_toUInt64(const sal_Unicode *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as an unsigned long integer.
SAL_DLLPUBLIC void rtl_uString_release(rtl_uString *str) SAL_THROW_EXTERN_C() SAL_HOT
Decrement the reference count of a string.
OUString(const sal_Unicode *value, sal_Int32 length)
New string from a Unicode character buffer array.
Definition: ustring.hxx:228
sal_Int32 compareToIgnoreAsciiCaseAscii(const sal_Char *asciiStr) const
Compares two ASCII strings ignoring case.
Definition: ustring.hxx:1177
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_Int32 getLength() const
Returns the length of this string.
Definition: ustring.hxx:634
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 ...
Definition: ustring.hxx:1312
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.
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:250
#define OSTRING_TO_OUSTRING_CVTFLAGS
Definition: ustring.h:2119
sal_Int32 lastIndexOf(const OUString &str, sal_Int32 fromIndex) const
Returns the index within this string of the last occurrence of the specified substring, searching backward starting before the specified index.
Definition: ustring.hxx:2116
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:2922
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 matchAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength, sal_Int32 fromIndex=0) const
Match against a substring appearing in this string.
Definition: ustring.hxx:1231
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.
bool equalsAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength) const
Perform a comparison of two strings.
Definition: ustring.hxx:1127
sal_Int32 indexOf(sal_Unicode ch, sal_Int32 fromIndex=0) const
Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index.
Definition: ustring.hxx:1938
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 ...
Definition: ustring.hxx:736
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_Int32 getLength() const
Returns the length of this string.
Definition: string.hxx:403
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_Int32 indexOf(const OUString &str, sal_Int32 fromIndex=0) const
Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.
Definition: ustring.hxx:1990
SAL_DLLPUBLIC sal_Int32 rtl_uString_getToken(rtl_uString **newStr, rtl_uString *str, sal_Int32 token, sal_Unicode cTok, sal_Int32 idx) SAL_THROW_EXTERN_C()
Create a new string by extracting a single token from another string.
SAL_DLLPUBLIC sal_Bool rtl_convertUStringToString(rtl_String **pTarget, sal_Unicode const *pSource, sal_Int32 nLength, rtl_TextEncoding nEncoding, sal_uInt32 nFlags) SAL_THROW_EXTERN_C()
Converts a Unicode string to a byte string, signalling failure.
SAL_DLLPUBLIC sal_Int64 rtl_ustr_toInt64(const sal_Unicode *str, sal_Int16 radix) SAL_THROW_EXTERN_C()
Interpret a string as a long integer.