20 #ifndef INCLUDED_RTL_USTRING_HXX 21 #define INCLUDED_RTL_USTRING_HXX 37 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 38 #include <config_global.h> 47 #ifdef RTL_STRING_UNITTEST 48 #define rtl rtlunittest 54 #ifdef RTL_STRING_UNITTEST 58 #if defined LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 72 explicit SAL_CONSTEXPR OUStringLiteral(
const char (&str)[ N ] ) : size( N - 1 ), data( str )
166 #if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST_CONCAT 217 template<
typename T >
232 #ifdef RTL_STRING_UNITTEST 233 rtl_string_unittest_const_literal =
true;
237 #ifdef RTL_STRING_UNITTEST 242 template<
typename T >
247 rtl_string_unittest_invalid_conversion =
true;
253 template<
typename T >
258 rtl_string_unittest_invalid_conversion =
true;
262 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 279 OUString(OUStringLiteral literal): pData(NULL) {
306 throw std::bad_alloc();
327 sal_uInt32
const * codePoints, sal_Int32 codePointCount):
332 throw std::bad_alloc();
336 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 341 template<
typename T1,
typename T2 >
342 OUString(
const OUStringConcat< T1, T2 >& c )
344 const sal_Int32 l = c.length();
376 {
return *
reinterpret_cast< OUString const *
>( ppHandle ); }
401 template<
typename T >
424 #if defined LIBO_INTERNAL_ONLY && HAVE_CXX11_REF_QUALIFIER 431 #if defined LIBO_INTERNAL_ONLY && HAVE_CXX11_REF_QUALIFIER 432 void operator+=(
OUString const &) && =
delete;
443 operator +=(T & literal)
444 #if defined LIBO_INTERNAL_ONLY && HAVE_CXX11_REF_QUALIFIER 456 #if defined LIBO_INTERNAL_ONLY && HAVE_CXX11_REF_QUALIFIER 459 operator +=(T &) && =
delete;
462 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 467 template<
typename T1,
typename T2 >
468 OUString& operator+=(
const OUStringConcat< T1, T2 >& c )
469 #if HAVE_CXX11_REF_QUALIFIER 473 sal_Int32 l = c.length();
478 sal_Unicode* end = c.addData( pData->buffer + pData->length );
483 #if HAVE_CXX11_REF_QUALIFIER 484 template<
typename T1,
typename T2>
void operator +=(
485 OUStringConcat<T1, T2>
const &) && =
delete;
518 return pData->length == 0;
541 assert(index >= 0 && static_cast<sal_uInt32>(index) < static_cast<sal_uInt32>(getLength()));
542 return getStr()[index];
560 str.pData->buffer, str.pData->length );
581 str.pData->buffer, str.pData->length, maxLength );
599 str.pData->buffer, str.pData->length );
607 template<
typename T >
613 pData->buffer, pData->length,
631 if ( pData->length != str.pData->length )
633 if ( pData == str.pData )
636 str.pData->buffer, str.pData->length ) == 0;
655 if ( pData->length != str.pData->length )
657 if ( pData == str.pData )
660 str.pData->buffer, str.pData->length ) == 0;
681 str.pData->buffer, str.pData->length );
690 template<
typename T >
699 pData->buffer, pData->length,
723 str.pData->buffer, str.pData->length, str.pData->length ) == 0;
731 template<
typename T >
738 pData->buffer+fromIndex, pData->length-fromIndex,
766 str.pData->buffer, str.pData->length,
767 str.pData->length ) == 0;
775 template<
typename T >
782 pData->buffer+fromIndex, pData->length-fromIndex,
833 "replace s1.compareToAscii(s2, strlen(s2)) == 0 with s1.startsWith(s2)")
834 sal_Int32 compareToAscii( const
sal_Char * asciiStr, sal_Int32 maxLength )
const 837 asciiStr, maxLength );
862 asciiStr, asciiStrLength );
905 if ( pData->length != asciiStrLength )
909 pData->buffer, asciiStr, asciiStrLength );
980 if ( pData->length != asciiStrLength )
1010 asciiStr, asciiStrLength ) == 0;
1017 #if SAL_TYPES_SIZEOFLONG == 8 1048 asciiStr, asciiStrLength ) == 0;
1055 #if SAL_TYPES_SIZEOFLONG == 8 1075 bool b = match(str);
1076 if (b && rest != NULL) {
1087 template<
typename T >
1089 T & literal,
OUString * rest = NULL)
const 1095 <= sal_uInt32(pData->length))
1101 if (b && rest != NULL) {
1131 bool b = matchIgnoreAsciiCase(str);
1132 if (b && rest != NULL) {
1143 template<
typename T >
1157 if (b && rest != NULL) {
1180 && match(str, getLength() - str.
getLength());
1181 if (b && rest != NULL) {
1182 *rest = copy(0, getLength() - str.
getLength());
1192 template<
typename T >
1200 <= sal_uInt32(pData->length))
1202 (pData->buffer + pData->length
1207 if (b && rest != NULL) {
1230 return asciiStrLength <= pData->length
1232 pData->buffer + pData->length - asciiStrLength, asciiStr,
1259 && matchIgnoreAsciiCase(str, getLength() - str.
getLength());
1260 if (b && rest != NULL) {
1261 *rest = copy(0, getLength() - str.
getLength());
1271 template<
typename T >
1279 <= sal_uInt32(pData->length))
1281 (pData->buffer + pData->length
1288 if (b && rest != NULL) {
1308 char const * asciiStr, sal_Int32 asciiStrLength)
const 1310 return asciiStrLength <= pData->length
1312 pData->buffer + pData->length - asciiStrLength,
1313 asciiStrLength, asciiStr, asciiStrLength)
1318 {
return rStr1.
equals(rStr2); }
1320 {
return rStr1.
compareTo( pStr2 ) == 0; }
1332 {
return rStr1.
compareTo( rStr2 ) < 0; }
1334 {
return rStr1.
compareTo( rStr2 ) > 0; }
1336 {
return rStr1.
compareTo( rStr2 ) <= 0; }
1338 {
return rStr1.
compareTo( rStr2 ) >= 0; }
1347 template<
typename T >
1352 return string.equalsAsciiL(
1363 template<
typename T >
1368 return string.equalsAsciiL(
1379 template<
typename T >
1384 return !
string.equalsAsciiL(
1395 template<
typename T >
1400 return !
string.equalsAsciiL(
1405 #if defined LIBO_INTERNAL_ONLY 1424 lhs.pData->buffer, lhs.pData->length, rhs.data))
1428 friend bool operator <=(
OUString const & lhs, OUStringLiteral
const & rhs) {
1431 lhs.pData->buffer, lhs.pData->length, rhs.data))
1438 lhs.pData->buffer, lhs.pData->length, rhs.data))
1442 friend bool operator >=(
OUString const & lhs, OUStringLiteral
const & rhs) {
1445 lhs.pData->buffer, lhs.pData->length, rhs.data))
1460 rhs.pData->buffer, rhs.pData->length, lhs.data))
1464 friend bool operator <=(OUStringLiteral
const & lhs,
OUString const & rhs) {
1467 rhs.pData->buffer, rhs.pData->length, lhs.data))
1474 rhs.pData->buffer, rhs.pData->length, lhs.data))
1478 friend bool operator >=(OUStringLiteral
const & lhs,
OUString const & rhs) {
1481 rhs.pData->buffer, rhs.pData->length, lhs.data))
1516 return (ret < 0 ? ret : ret+fromIndex);
1568 str.pData->buffer, str.pData->length );
1569 return (ret < 0 ? ret : ret+fromIndex);
1577 template<
typename T >
1583 pData->buffer + fromIndex, pData->length - fromIndex,
1586 return n < 0 ? n : n + fromIndex;
1613 char const * str, sal_Int32 len, sal_Int32 fromIndex = 0)
const 1616 pData->buffer + fromIndex, pData->length - fromIndex, str, len);
1617 return ret < 0 ? ret : ret + fromIndex;
1624 #if SAL_TYPES_SIZEOFLONG == 8 1646 str.pData->buffer, str.pData->length );
1669 str.pData->buffer, str.pData->length );
1677 template<
typename T >
1683 pData->buffer, pData->length,
1710 pData->buffer, pData->length, str, len);
1725 rtl_uString *pNew = NULL;
1744 rtl_uString *pNew = NULL;
1759 rtl_uString* pNew = NULL;
1764 #ifndef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 1767 return rStr1.
concat( rStr2 );
1786 rtl_uString* pNew = NULL;
1806 rtl_uString* pNew = NULL;
1830 OUString const & from,
OUString const & to, sal_Int32 * index = NULL)
const 1832 rtl_uString * s = NULL;
1835 &s, pData, from.pData, to.pData, index == NULL ? &i : index);
1857 template<
typename T >
1859 sal_Int32 * index = NULL)
const 1862 rtl_uString * s = NULL;
1868 index == NULL ? &i : index);
1890 template<
typename T >
1892 sal_Int32 * index = NULL)
const 1895 rtl_uString * s = NULL;
1898 &s, pData, from.pData,
1901 index == NULL ? &i : index);
1923 template<
typename T1,
typename T2 >
1929 rtl_uString * s = NULL;
1937 index == NULL ? &i : index);
1959 rtl_uString * s = NULL;
1977 template<
typename T >
1981 rtl_uString * s = NULL;
2002 template<
typename T >
2006 rtl_uString * s = NULL;
2008 &s, pData, from.pData,
2027 template<
typename T1,
typename T2 >
2033 rtl_uString * s = NULL;
2055 rtl_uString* pNew = NULL;
2072 rtl_uString* pNew = NULL;
2090 rtl_uString* pNew = NULL;
2121 rtl_uString * pNew = NULL;
2141 return getToken(count, separator, n);
2165 return pData->buffer[0];
2276 rtl_uString * pNew = NULL;
2279 throw std::bad_alloc();
2312 sal_uInt32 *pInfo = NULL )
2314 rtl_uString * pNew = NULL;
2316 convertFlags, pInfo );
2318 throw std::bad_alloc();
2348 sal_uInt32 nFlags)
const 2351 pData->length, nEncoding, nFlags);
2406 sal_Int32 * indexUtf16, sal_Int32 incrementCodePoints = 1)
const 2409 pData, indexUtf16, incrementCodePoints);
2470 rtl_uString* pNewData = NULL;
2478 return number( static_cast< unsigned long long >( i ), radix );
2484 return number( static_cast< long long >( i ), radix );
2490 return number( static_cast< unsigned long long >( i ), radix );
2497 rtl_uString* pNewData = NULL;
2506 rtl_uString* pNewData = NULL;
2523 rtl_uString* pNewData = NULL;
2540 rtl_uString* pNewData = NULL;
2575 rtl_uString* pNewData = NULL;
2604 return number( i, radix );
2619 return number( ll, radix );
2667 rtl_uString* pNew = NULL;
2673 #if defined LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 2680 struct ToStringHelper< OUString >
2682 static int length(
const OUString& s ) {
return s.
getLength(); }
2684 static const bool allowOStringConcat =
false;
2685 static const bool allowOUStringConcat =
true;
2692 struct ToStringHelper< OUStringLiteral >
2694 static int length(
const OUStringLiteral& str ) {
return str.size; }
2695 static sal_Unicode* addData(
sal_Unicode* buffer,
const OUStringLiteral& str ) {
return addDataLiteral( buffer, str.data, str.size ); }
2696 static const bool allowOStringConcat =
false;
2697 static const bool allowOUStringConcat =
true;
2703 template<
typename charT,
typename traits,
typename T1,
typename T2 >
2704 inline std::basic_ostream<charT, traits> &
operator <<(
2705 std::basic_ostream<charT, traits> & stream,
const OUStringConcat< T1, T2 >& concat)
2707 return stream << OUString( concat );
2730 {
return (
size_t)rString.
hashCode(); }
2756 return OUString( rStr.
getStr(), rStr.
getLength(), encoding, convertFlags );
2793 template<
typename charT,
typename traits >
2795 std::basic_ostream<charT, traits> & stream, OUString
const &
string)
2805 #ifdef RTL_STRING_UNITTEST 2808 typedef rtlunittest::OUString
OUString;
2815 #if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST 2816 using ::rtl::OUString;
2817 using ::rtl::OUStringHash;
2820 using ::rtl::OUStringLiteral;
2821 using ::rtl::OUStringLiteral1;
SAL_DLLPUBLIC void rtl_uString_newToAsciiUpperCase(rtl_uString **newStr, rtl_uString *str) SAL_THROW_EXTERN_C()
Create a new string by converting all ASCII lowercase letters to uppercase within another string...
static OUString boolean(bool b)
Returns the string representation of the boolean argument.
Definition: ustring.hxx:2572
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:1612
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:2309
OUString()
New string containing no characters.
Definition: ustring.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.
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.
double toDouble() const
Returns the double value from this string.
Definition: ustring.hxx:2253
#define OSTRING_TO_OUSTRING_CVTFLAGS
Definition: ustring.h:1894
sal_Int32 toInt32(sal_Int16 radix=10) const
Returns the int32 value from this string.
Definition: ustring.hxx:2178
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.
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:608
const sal_Unicode * getStr() const
Returns a pointer to the Unicode character buffer for this string.
Definition: ustring.hxx:528
void clear()
Clears the string, i.e, makes a zero-character string.
Definition: ustring.hxx:493
bool equalsIgnoreAsciiCaseAscii(const sal_Char *asciiStr) const
Perform a ASCII lowercase comparison of two strings.
Definition: ustring.hxx:930
SAL_DLLPUBLIC void rtl_uString_newReplaceFirst(rtl_uString **newStr, rtl_uString *str, rtl_uString const *from, rtl_uString const *to, sal_Int32 *index) SAL_THROW_EXTERN_C()
Create a new string by replacing the first occurrence of a given substring with another substring...
sal_Int32 getLength() const
Returns the length of this string.
Definition: ustring.hxx:506
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:1045
OUString & operator=(const OUString &str)
Assign a new string.
Definition: ustring.hxx:383
SAL_DLLPUBLIC void rtl_uString_new(rtl_uString **newStr) SAL_THROW_EXTERN_C()
Allocate a new string containing no characters.
bool endsWith(OUString const &str, OUString *rest=NULL) const
Check whether this string ends with a given substring.
Definition: ustring.hxx:1178
OUString intern() const
Return a canonical representation for a string.
Definition: ustring.hxx:2274
static OUString const & unacquired(rtl_uString *const *ppHandle)
Provides an OUString const & passing a storage pointer of an rtl_uString * handle.
Definition: ustring.hxx:375
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.
sal_uInt64 toUInt64(sal_Int16 radix=10) const
Returns the uint64 value from this string.
Definition: ustring.hxx:2227
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.
char sal_Char
A legacy synonym for char.
Definition: types.h:130
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.
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:2494
#define RTL_TEXTENCODING_UTF8
Definition: textenc.h:121
SAL_DLLPUBLIC sal_Int32 rtl_ustr_compare_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Unicode *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings.
OUString 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:2752
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.
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator==(const OUString &string, T &literal)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1348
#define RTL_USTR_MAX_VALUEOFBOOLEAN
Definition: ustring.h:915
OUString(sal_Unicode value)
New string from a single Unicode character.
Definition: ustring.hxx:160
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 void rtl_uString_newFromCodePoints(rtl_uString **newString, sal_uInt32 const *codePoints, sal_Int32 codePointCount) SAL_THROW_EXTERN_C()
Allocate a new string from an array of Unicode code points.
#define RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR
Definition: textcvt.h:71
#define RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR
Definition: textcvt.h:64
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:2476
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:612
OUString(sal_uInt32 const *codePoints, sal_Int32 codePointCount)
Create a new string from an array of Unicode code points.
Definition: ustring.hxx:326
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:2776
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:2482
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_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 double rtl_ustr_toDouble(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Interpret a string as a double.
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_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.
size_t operator()(const OUString &rString) const
Compute a hash code for a string.
Definition: ustring.hxx:2729
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.
bool toBoolean() const
Returns the Boolean value from this string.
Definition: ustring.hxx:2152
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 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...
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.
OUString getToken(sal_Int32 count, sal_Unicode separator) const
Returns a token from the string.
Definition: ustring.hxx:2139
SAL_WARN_UNUSED_RESULT OUString concat(const OUString &str) const
Concatenates the specified string to the end of this string.
Definition: ustring.hxx:1757
bool equals(const OUString &str) const
Perform a comparison of two strings.
Definition: ustring.hxx:629
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.
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:1007
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:1707
Definition: stringutils.hxx:160
bool convertToString(OString *pTarget, rtl_TextEncoding nEncoding, sal_uInt32 nFlags) const
Converts to an OString, signalling failure.
Definition: ustring.hxx:2347
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &stream, OString const &string)
Support for rtl::OString in std::ostream (and thus in CPPUNIT_ASSERT or SAL_INFO macros, for example).
Definition: string.hxx:1858
SAL_DLLPUBLIC void rtl_uString_intern(rtl_uString **newStr, rtl_uString *str) SAL_THROW_EXTERN_C()
Return a canonical representation for a string.
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_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.
#define RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR
Definition: textcvt.h:68
#define RTL_STR_MAX_VALUEOFUINT64
Definition: string.h:673
friend OUString operator+(const OUString &rStr1, const OUString &rStr2)
Definition: ustring.hxx:1765
sal_Int32 compareTo(const OUString &str, sal_Int32 maxLength) const
Compares two strings with a maximum count of characters.
Definition: ustring.hxx:578
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 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.
#define RTL_USTR_MAX_VALUEOFINT32
Definition: ustring.h:957
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:1643
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_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...
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:2503
unsigned char sal_Bool
Definition: types.h:48
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfFloat(sal_Unicode *str, float f) SAL_THROW_EXTERN_C()
Create the string representation of a float.
bool operator<(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:96
const sal_Char * getStr() const
Returns a pointer to the characters of this string.
Definition: string.hxx:394
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.
#define RTL_USTR_MAX_VALUEOFFLOAT
Definition: ustring.h:1022
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:1545
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.
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:691
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:1578
SAL_DLLPUBLIC void rtl_uString_acquire(rtl_uString *str) SAL_THROW_EXTERN_C()
Increment the reference count of a string.
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:1256
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:1273
static OUString fromUtf8(const OString &rSource)
Convert an OString to an OUString, assuming that the OString is UTF-8-encoded.
Definition: ustring.hxx:2421
SAL_DLLPUBLIC sal_Bool rtl_ustr_toBoolean(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Interpret a string as a boolean.
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:2405
bool operator>(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:106
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:1742
bool equalsAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength) const
Perform a comparison of two strings.
Definition: ustring.hxx:903
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator!=(T &literal, const OUString &string)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1396
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:584
sal_Int32 reverseCompareTo(const OUString &str) const
Compares two strings in reverse order.
Definition: ustring.hxx:596
SAL_DLLPUBLIC void rtl_uString_newFromSubString(rtl_uString **newStr, const rtl_uString *from, sal_Int32 beginIndex, sal_Int32 count) SAL_THROW_EXTERN_C()
Allocate a new string that is a substring of this string.
__sal_NoAcquire
Definition: types.h:382
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_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:1784
#define SAL_WARN_UNUSED_RESULT
Use this as markup for functions and methods whose return value must be checked.
Definition: types.h:323
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:1829
bool match(const OUString &str, sal_Int32 fromIndex=0) const
Match against a substring appearing in this string.
Definition: ustring.hxx:720
sal_uInt32 toUInt32(sal_Int16 radix=10) const
Returns the uint32 value from this string.
Definition: ustring.hxx:2195
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:1978
bool isEmpty() const
Checks if a string is empty.
Definition: ustring.hxx:516
OString toUtf8() const
Convert this string to an OString, assuming that the string can be UTF-8-encoded successfully.
Definition: ustring.hxx:2444
OUString(rtl_uString *str)
New string from OUString data.
Definition: ustring.hxx:138
SAL_DLLPUBLIC void rtl_uString_newReplaceAllFromIndex(rtl_uString **newStr, rtl_uString *str, rtl_uString const *from, rtl_uString const *to, sal_Int32 fromIndex) SAL_THROW_EXTERN_C()
Create a new string by replacing all occurrences of a given substring with another substring...
SAL_WARN_UNUSED_RESULT OUString copy(sal_Int32 beginIndex) const
Returns a new string that is a substring of this string.
Definition: ustring.hxx:1723
#define RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR
Definition: textcvt.h:134
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:1088
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:763
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_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_uInt16 sal_Unicode
Definition: types.h:155
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator!=(const OUString &string, T &literal)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1380
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.
OUString getToken(sal_Int32 token, sal_Unicode cTok, sal_Int32 &index) const
Returns a token in the string.
Definition: ustring.hxx:2119
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:2053
SAL_DLLPUBLIC void rtl_uString_newToAsciiLowerCase(rtl_uString **newStr, rtl_uString *str) SAL_THROW_EXTERN_C()
Create a new string by converting all ASCII uppercase letters to lowercase within another string...
sal_uInt16 rtl_TextEncoding
The various supported text encodings.
Definition: textenc.h:39
sal_Int32 compareToAscii(const sal_Char *asciiStr) const
Compares two strings.
Definition: ustring.hxx:805
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.
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:1128
sal_Unicode toChar() const
Returns the first character from this string.
Definition: ustring.hxx:2163
bool equalsIgnoreAsciiCaseAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength) const
Perform an ASCII lowercase comparison of two strings.
Definition: ustring.hxx:978
static OUString number(float f)
Returns the string representation of the float argument.
Definition: ustring.hxx:2520
SAL_DLLPUBLIC sal_Int32 rtl_ustr_ascii_shortenedCompare_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Char *second, sal_Int32 shortenedLen) SAL_THROW_EXTERN_C()
Compare two strings with a maximum count of characters.
sal_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:1666
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:1513
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:1891
float toFloat() const
Returns the float value from this string.
Definition: ustring.hxx:2240
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:1528
sal_Int64 toInt64(sal_Int16 radix=10) const
Returns the int64 value from this string.
Definition: ustring.hxx:2210
sal_Int32 compareToIgnoreAsciiCaseAscii(const sal_Char *asciiStr) const
Compares two ASCII strings ignoring case.
Definition: ustring.hxx:953
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:2029
A helper to use OUStrings with hash maps.
Definition: ustring.hxx:2718
Definition: bootstrap.hxx:29
This String class provides base functionality for C++ like Unicode character array handling...
Definition: ustring.hxx:106
definition of a no acquire enum for ctors
Definition: types.h:386
#define SAL_CONSTEXPR
C++11 "constexpr" feature.
Definition: types.h:443
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:776
#define RTL_USTR_MAX_VALUEOFDOUBLE
Definition: ustring.h:1041
#define SAL_DEPRECATED(message)
Use as follows: SAL_DEPRECATED("Dont use, its evil.") void doit(int nPara);.
Definition: types.h:499
SAL_DLLPUBLIC sal_Int32 rtl_ustr_reverseCompare_WithLength(const sal_Unicode *first, sal_Int32 firstLen, const sal_Unicode *second, sal_Int32 secondLen) SAL_THROW_EXTERN_C()
Compare two strings from back to front.
sal_Int32 compareTo(const OUString &str) const
Compares two strings.
Definition: ustring.hxx:557
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:218
sal_Int32 getLength() const
Returns the length of this string.
Definition: string.hxx:368
bool endsWithAsciiL(char const *asciiStr, sal_Int32 asciiStrLength) const
Check whether this string ends with a given ASCII string.
Definition: ustring.hxx:1227
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...
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:299
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:732
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_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:2070
sal_Int32 hashCode() const
Returns a hashcode for this string.
Definition: ustring.hxx:1495
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_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_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:1956
bool operator==(const TTimeValue &rTimeA, const TTimeValue &rTimeB)
Definition: timer.hxx:116
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:2088
OUString(const sal_Unicode *value)
New string from a Unicode character buffer array.
Definition: ustring.hxx:182
sal_Int32 compareToIgnoreAsciiCase(const OUString &str) const
Perform a ASCII lowercase comparison of two strings.
Definition: ustring.hxx:678
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:1858
static OUString createFromAscii(const sal_Char *value)
Returns a OUString copied without conversion from an ASCII character string.
Definition: ustring.hxx:2665
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.
OUString(const OUString &str)
New string from OUString.
Definition: ustring.hxx:127
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:1804
Definition: stringutils.hxx:117
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 void rtl_uString_newConcat(rtl_uString **newStr, rtl_uString *left, rtl_uString *right) SAL_THROW_EXTERN_C()
Create a new string that is the concatenation of two other strings.
SAL_DLLPUBLIC 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.
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:1194
OUString & operator+=(const OUString &str)
Append a string to this string.
Definition: ustring.hxx:423
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:2488
SAL_DLLPUBLIC void rtl_uString_release(rtl_uString *str) SAL_THROW_EXTERN_C()
Decrement the reference count of a string.
#define RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR
Definition: textcvt.h:128
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:1565
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...
#define RTL_STR_MAX_VALUEOFINT64
Definition: string.h:650
bool equalsAscii(const sal_Char *asciiStr) const
Perform a comparison of two strings.
Definition: ustring.hxx:880
~OUString()
Release the string data.
Definition: ustring.hxx:359
static OUString number(double d)
Returns the string representation of the double argument.
Definition: ustring.hxx:2537
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 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_DLLPUBLIC sal_Int32 rtl_ustr_indexOfChar_WithLength(const sal_Unicode *str, sal_Int32 len, sal_Unicode ch) SAL_THROW_EXTERN_C()
Search for the first occurrence of a character within a string.
SAL_DLLPUBLIC sal_Int32 rtl_ustr_lastIndexOfChar_WithLength(const sal_Unicode *str, sal_Int32 len, sal_Unicode ch) SAL_THROW_EXTERN_C()
Search for the last occurrence of a character within a string.
SAL_DLLPUBLIC 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_Int32 reverseCompareToAsciiL(const sal_Char *asciiStr, sal_Int32 asciiStrLength) const
Compares two strings in reverse order.
Definition: ustring.hxx:859
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, 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:1678
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:1145
bool equalsIgnoreAsciiCase(const OUString &str) const
Perform a ASCII lowercase comparison of two strings.
Definition: ustring.hxx:653
OUString(rtl_uString *str, __sal_NoAcquire)
New OUString from OUString data without acquiring it.
Definition: ustring.hxx:152
friend libreoffice_internal::ConstCharArrayDetector< T, bool >::Type operator==(T &literal, const OUString &string)
Compare string to an ASCII string literal.
Definition: ustring.hxx:1364
bool startsWith(OUString const &str, OUString *rest=NULL) const
Check whether this string starts with a given substring.
Definition: ustring.hxx:1074
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:1307
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:1925
OUString(const sal_Unicode *value, sal_Int32 length)
New string from a Unicode character buffer array.
Definition: ustring.hxx:196
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.
static OUString number(int i, sal_Int16 radix=10)
Returns the string representation of the integer argument.
Definition: ustring.hxx:2467
SAL_DLLPUBLIC rtl_uString * rtl_uString_alloc(sal_Int32 nLen) SAL_THROW_EXTERN_C()
Allocate a new string containing space for a given number of characters.
SAL_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:2003
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:402
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.
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...
This String class provide base functionality for C++ like 8-Bit character array handling.
Definition: string.hxx:90
SAL_DLLPUBLIC float rtl_ustr_toFloat(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Interpret a string as a float.
#define OUSTRING_TO_OSTRING_CVTFLAGS
Definition: string.h:1324