20 #ifndef INCLUDED_RTL_USTRBUF_HXX 21 #define INCLUDED_RTL_USTRBUF_HXX 30 #if defined LIBO_INTERNAL_ONLY 31 #include <string_view> 39 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 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 88 , nCapacity( value.nCapacity )
101 , nCapacity( length )
105 #if __cplusplus >= 201103L 110 #if SAL_TYPES_SIZEOFLONG == 4 112 explicit OUStringBuffer(
long length)
113 : OUStringBuffer(static_cast<int>(length))
116 explicit OUStringBuffer(
unsigned long length)
117 : OUStringBuffer(static_cast<int>(length))
122 explicit OUStringBuffer(
char) =
delete;
138 , nCapacity( value.getLength() + 16 )
143 template<
typename T >
146 , nCapacity( libreoffice_internal::ConstCharArrayDetector<T>::length + 16 )
154 #ifdef RTL_STRING_UNITTEST 155 rtl_string_unittest_const_literal =
true;
159 #if defined LIBO_INTERNAL_ONLY 168 nCapacity(libreoffice_internal::ConstCharArrayDetector<T>::length + 16)
177 OUStringBuffer(OUStringLiteral
const & literal):
178 pData(nullptr), nCapacity(literal.size + 16)
184 #ifdef RTL_STRING_UNITTEST 189 template<
typename T >
195 rtl_string_unittest_invalid_conversion =
true;
201 template<
typename T >
207 rtl_string_unittest_invalid_conversion =
true;
211 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 216 template<
typename T1,
typename T2 >
217 OUStringBuffer( OUStringConcat< T1, T2 >&& c )
219 const sal_Int32 l = c.length();
237 nCapacity = value.nCapacity;
248 if (n >= nCapacity) {
249 ensureCapacity(n + 16);
252 pData->buffer,
string.pData->buffer,
265 operator =(T & literal) {
270 if (n >= nCapacity) {
271 ensureCapacity(n + 16);
277 for (sal_Int32 i = 0; i <= n; ++i) {
284 #if defined LIBO_INTERNAL_ONLY 289 operator =(T & literal) {
292 if (n >= nCapacity) {
293 ensureCapacity(n + 16);
297 libreoffice_internal::ConstCharArrayDetector<T>::toPointer(literal),
304 OUStringBuffer & operator =(OUStringLiteral
const & literal) {
305 sal_Int32
const n = literal.size;
306 if (n >= nCapacity) {
307 ensureCapacity(n + 16);
309 char const * from = literal.data;
311 for (sal_Int32 i = 0; i <= n; ++i) {
319 #if defined LIBO_INTERNAL_ONLY 321 template<
typename T1,
typename T2>
322 OUStringBuffer & operator =(OUStringConcat<T1, T2> && concat) {
323 sal_Int32
const n = concat.length();
324 if (n >= nCapacity) {
325 ensureCapacity(n + 16);
327 *concat.addData(pData->buffer) = 0;
363 return pData->length;
376 return pData->length == 0;
430 assert(newLength >= 0);
432 if( newLength != pData->length )
434 if( newLength > nCapacity )
437 pData->buffer[newLength] = 0;
438 pData->length = newLength;
458 assert(index >= 0 && index < pData->length);
459 return pData->buffer[ index ];
475 assert(index >= 0 && index < pData->length);
476 pData->buffer[ index ] = ch;
496 assert(index >= 0 && index < pData->length);
497 return pData->buffer[index];
511 assert(index >= 0 && index < pData->length);
512 return pData->buffer[index];
521 return OUString(pData->buffer, pData->length);
539 #if defined LIBO_INTERNAL_ONLY 541 if (sv.size() > sal_uInt32(std::numeric_limits<sal_Int32>::max())) {
542 throw std::bad_alloc();
544 return append(sv.data(), sv.size());
600 assert( len == 0 || str != NULL );
610 template<
typename T >
616 &pData, &nCapacity, getLength(),
622 #if defined LIBO_INTERNAL_ONLY 627 append(T & literal) {
629 &pData, &nCapacity, getLength(),
636 OUStringBuffer & append(OUStringLiteral
const & literal) {
638 &pData, &nCapacity, getLength(), literal.data, literal.size);
643 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING" 648 template<
typename T1,
typename T2 >
649 OUStringBuffer& append( OUStringConcat< T1, T2 >&& c )
651 sal_Int32 l = c.length();
656 sal_Unicode* end = c.addData( pData->buffer + pData->length );
731 template<
typename T >
778 assert(static_cast< unsigned char >(c) <= 0x7F);
794 return append( &c, 1 );
797 #if defined LIBO_INTERNAL_ONLY 798 void append(sal_uInt16) =
delete;
885 return insertUtf32(getLength(), c);
904 sal_Int32 n = getLength();
906 return pData->buffer + n;
971 assert( len == 0 || str != NULL );
981 template<
typename T >
987 &pData, &nCapacity, offset,
993 #if defined LIBO_INTERNAL_ONLY 998 insert(sal_Int32 offset, T & literal) {
1000 &pData, &nCapacity, offset,
1007 OUStringBuffer & insert(sal_Int32 offset, OUStringLiteral
const & literal) {
1009 &pData, &nCapacity, offset, literal.data, literal.size);
1083 return insert( offset, &u, 1 );
1104 return insert( offset, &c, 1 );
1271 sal_Int32 index = 0;
1272 while((index = indexOf(oldChar, index)) >= 0)
1274 pData->buffer[ index ] = newChar;
1295 sal_Int32 ** pInternalCapacity)
1297 *pInternalData = &pData;
1298 *pInternalCapacity = &nCapacity;
1319 assert( fromIndex >= 0 && fromIndex <= pData->length );
1321 return (ret < 0 ? ret : ret+fromIndex);
1356 assert( fromIndex >= 0 && fromIndex <= pData->length );
1379 assert( fromIndex >= 0 && fromIndex <= pData->length );
1381 str.pData->buffer, str.pData->length );
1382 return (ret < 0 ? ret : ret+fromIndex);
1391 template<
typename T >
1397 pData->buffer + fromIndex, pData->length - fromIndex,
1400 return n < 0 ? n : n + fromIndex;
1403 #if defined LIBO_INTERNAL_ONLY 1405 template<
typename T>
1408 indexOf(T & literal, sal_Int32 fromIndex = 0)
const {
1409 assert(fromIndex >= 0);
1411 pData->buffer + fromIndex, pData->length - fromIndex,
1414 return n < 0 ? n : n + fromIndex;
1418 sal_Int32 indexOf(OUStringLiteral
const & literal, sal_Int32 fromIndex = 0)
1422 pData->buffer + fromIndex, pData->length - fromIndex, literal.data,
1424 return n < 0 ? n : n + fromIndex;
1448 str.pData->buffer, str.pData->length );
1472 assert( fromIndex >= 0 && fromIndex <= pData->length );
1474 str.pData->buffer, str.pData->length );
1482 template<
typename T >
1488 pData->buffer, pData->length,
1493 #if defined LIBO_INTERNAL_ONLY 1495 template<
typename T>
1498 lastIndexOf(T & literal)
const {
1500 pData->buffer, pData->length,
1506 sal_Int32 lastIndexOf(OUStringLiteral
const & literal)
const {
1508 pData->buffer, pData->length, literal.data, literal.size);
1524 for(index = 0; index < getLength() ; index++)
1526 if(pData->buffer[ index ] != c)
1549 sal_Int32 result = getLength();
1551 for(index = getLength(); index > 0 ; index--)
1553 if(pData->buffer[ index - 1 ] != c)
1558 if(index < getLength())
1562 return result - getLength();
1575 return stripStart(c) + stripEnd(c);
1590 return copy( beginIndex, getLength() - beginIndex );
1608 assert(beginIndex >= 0 && beginIndex <= getLength());
1609 assert(count >= 0 && count <= getLength() - beginIndex);
1610 rtl_uString *pNew = NULL;
1619 nCapacity = capacity;
1625 rtl_uString * pData;
1630 sal_Int32 nCapacity;
1633 #if defined LIBO_INTERNAL_ONLY 1640 return operator=(str.toString());
1642 return internalAppend(str.pData);
1647 #ifdef RTL_STRING_UNITTEST 1650 typedef rtlunittest::OUStringBuffer OUStringBuffer;
1654 #if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST 1655 using ::rtl::OUStringBuffer;
1658 #endif // INCLUDED_RTL_USTRBUF_HXX OUStringBuffer & append(char c)
Appends the string representation of the ASCII char argument to this string buffer.
Definition: ustrbuf.hxx:776
OUStringBuffer & append(const sal_Unicode *str)
Appends the string representation of the char array argument to this string buffer.
Definition: ustrbuf.hxx:580
const OUString toString() const
Return a OUString instance reflecting the current content of this OUStringBuffer.
Definition: ustrbuf.hxx:519
OUStringBuffer & replace(sal_Unicode oldChar, sal_Unicode newChar)
Replace all occurrences of oldChar in this string buffer with newChar.
Definition: ustrbuf.hxx:1269
SAL_DLLPUBLIC sal_Int32 rtl_ustr_indexOfStr_WithLength(const sal_Unicode *str, sal_Int32 len, const sal_Unicode *subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
Search for the first occurrence of a substring within a string.
sal_Int32 indexOf(const OUString &str, sal_Int32 fromIndex=0) const
Returns the index within this string of the first occurrence of the specified substring,...
Definition: ustrbuf.hxx:1377
sal_Int32 indexOf(sal_Unicode ch, sal_Int32 fromIndex=0) const
Returns the index within this string of the first occurrence of the specified character,...
Definition: ustrbuf.hxx:1317
Dummy Type
Definition: stringutils.hxx:241
OUStringBuffer insert(sal_Int32 offset, float f)
Inserts the string representation of the float argument into this string buffer.
Definition: ustrbuf.hxx:1175
OUStringBuffer(const OUStringBuffer &value)
Allocates a new string buffer that contains the same sequence of characters as the string buffer argu...
Definition: ustrbuf.hxx:86
SAL_DLLPUBLIC sal_Int32 rtl_ustr_lastIndexOfAscii_WithLength(sal_Unicode const *str, sal_Int32 len, char const *subStr, sal_Int32 subLen) SAL_THROW_EXTERN_C()
Search for the last occurrence of an ASCII substring within a string.
sal_Int32 stripStart(sal_Unicode c=' ')
Strip the given character from the start of the buffer.
Definition: ustrbuf.hxx:1521
SAL_DLLPUBLIC sal_Int32 rtl_ustr_getLength(const sal_Unicode *str) SAL_THROW_EXTERN_C()
Return the length of a string.
SAL_DLLPUBLIC void rtl_uStringbuffer_insert(rtl_uString **This, sal_Int32 *capacity, sal_Int32 offset, const sal_Unicode *str, sal_Int32 len)
Inserts the string representation of the str array argument into this string buffer.
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: ustrbuf.hxx:1483
OUStringBuffer & append(sal_Int32 i, sal_Int16 radix=10)
Appends the string representation of the sal_Int32 argument to this string buffer.
Definition: ustrbuf.hxx:813
OUStringBuffer(int length)
Constructs a string buffer with no characters in it and an initial capacity specified by the length a...
Definition: ustrbuf.hxx:99
OUStringBuffer & insert(sal_Int32 offset, sal_Bool b)
Inserts the string representation of the sal_Bool argument into this string buffer.
Definition: ustrbuf.hxx:1031
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfFloat(sal_Unicode *str, float f) SAL_THROW_EXTERN_C()
Create the string representation of a float.
SAL_WARN_UNUSED_RESULT OUString makeStringAndClear()
Fill the string data in the new string and clear the buffer.
Definition: ustrbuf.hxx:349
Definition: bootstrap.hxx:29
OUStringBuffer & insert(sal_Int32 offset, const OUString &str)
Inserts the string into this string buffer.
Definition: ustrbuf.hxx:924
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.
OUStringBuffer & appendAscii(const sal_Char *str, sal_Int32 len)
Appends a 8-Bit ASCII character string to this string buffer.
Definition: ustrbuf.hxx:702
#define RTL_USTR_MAX_VALUEOFINT32
Definition: ustring.h:957
OUStringBuffer & insert(sal_Int32 offset, char c)
Inserts the string representation of the char argument into this string buffer.
Definition: ustrbuf.hxx:1080
OUStringBuffer & insert(sal_Int32 offset, sal_Int64 l, sal_Int16 radix=10)
Inserts the string representation of the long argument into this string buffer.
Definition: ustrbuf.hxx:1151
#define SAL_DELETED_FUNCTION
short-circuit extra-verbose API namespaces
Definition: types.h:396
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.
OUStringBuffer & insert(sal_Int32 offset, double d)
Inserts the string representation of the double argument into this string buffer.
Definition: ustrbuf.hxx:1199
OUStringBuffer(const OUString &value)
Constructs a string buffer so that it represents the same sequence of characters as the string argume...
Definition: ustrbuf.hxx:136
sal_Int32 strip(sal_Unicode c=' ')
Strip the given character from the both end of the buffer.
Definition: ustrbuf.hxx:1573
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.
OUStringBuffer & truncate(sal_Int32 start=0)
Removes the tail of a string buffer start at the indicate position.
Definition: ustrbuf.hxx:1253
SAL_DLLPUBLIC void rtl_uStringbuffer_remove(rtl_uString **This, sal_Int32 start, sal_Int32 len)
Removes the characters in a substring of this sequence.
OUStringBuffer & append(const OUString &str)
Appends the string to this string buffer.
Definition: ustrbuf.hxx:534
#define SAL_DEPRECATED(message)
Use as follows: SAL_DEPRECATED("Don't use, it's evil.") void doit(int nPara);.
Definition: types.h:465
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:578
OUStringBuffer & append(double d)
Appends the string representation of the double argument to this string buffer.
Definition: ustrbuf.hxx:865
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfInt64(sal_Unicode *str, sal_Int64 l, sal_Int16 radix) SAL_THROW_EXTERN_C()
Create the string representation of a long integer.
SAL_DLLPUBLIC void rtl_uStringbuffer_newFromStr_WithLength(rtl_uString **newStr, const sal_Unicode *value, sal_Int32 count)
Allocates a new String that contains characters from the character array argument.
OUStringBuffer & append(float f)
Appends the string representation of the float argument to this string buffer.
Definition: ustrbuf.hxx:848
#define RTL_USTR_MAX_VALUEOFBOOLEAN
Definition: ustring.h:915
sal_Int32 lastIndexOf(sal_Unicode ch) const
Returns the index within this string of the last occurrence of the specified character,...
Definition: ustrbuf.hxx:1335
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfDouble(sal_Unicode *str, double d) SAL_THROW_EXTERN_C()
Create the string representation of a double.
Definition: stringutils.hxx:146
OUStringBuffer & insertUtf32(sal_Int32 offset, sal_uInt32 c)
Inserts a single UTF-32 character into this string buffer.
Definition: ustrbuf.hxx:1220
sal_uInt16 sal_Unicode
Definition: types.h:141
OUStringBuffer & append(sal_Unicode c)
Appends the string representation of the char argument to this string buffer.
Definition: ustrbuf.hxx:792
OUStringBuffer & append(const OUStringBuffer &str)
Appends the content of a stringbuffer to this string buffer.
Definition: ustrbuf.hxx:560
libreoffice_internal::ConstCharArrayDetector< T, OUStringBuffer & >::Type insert(sal_Int32 offset, T &literal)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: ustrbuf.hxx:982
#define RTL_USTR_MAX_VALUEOFINT64
Definition: ustring.h:1003
unsigned char sal_Bool
Definition: types.h:38
sal_Int32 getCapacity() const
Returns the current capacity of the String buffer.
Definition: ustrbuf.hxx:389
OUStringBuffer()
Constructs a string buffer with no characters in it and an initial capacity of 16 characters.
Definition: ustrbuf.hxx:73
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.
OUStringBuffer & appendUtf32(sal_uInt32 c)
Appends a single UTF-32 character to this string buffer.
Definition: ustrbuf.hxx:884
OUStringBuffer & append(rtl_uString *str)
Definition: ustrbuf.hxx:742
OUStringBuffer & insert(sal_Int32 offset, const sal_Unicode *str)
Inserts the string representation of the char array argument into this string buffer.
Definition: ustrbuf.hxx:946
const sal_Unicode * getStr() const SAL_RETURNS_NONNULL
Return a null terminated unicode character array.
Definition: ustrbuf.hxx:483
SAL_DLLPUBLIC sal_Int32 rtl_str_getLength(const sal_Char *str) SAL_THROW_EXTERN_C()
Return the length of a string.
Definition: stringutils.hxx:299
OUStringBuffer & remove(sal_Int32 start, sal_Int32 len)
Removes the characters in a substring of this sequence.
Definition: ustrbuf.hxx:1237
Definition: stringutils.hxx:280
OUStringBuffer & insert(sal_Int32 offset, const sal_Unicode *str, sal_Int32 len)
Inserts the string representation of the char array argument into this string buffer.
Definition: ustrbuf.hxx:969
SAL_DLLPUBLIC void rtl_uStringbuffer_insert_ascii(rtl_uString **This, sal_Int32 *capacity, sal_Int32 offset, const sal_Char *str, sal_Int32 len)
Inserts the 8-Bit ASCII string representation of the str array argument into this string buffer.
libreoffice_internal::ConstCharArrayDetector< T, OUStringBuffer & >::Type append(T &literal)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: ustrbuf.hxx:611
OUStringBuffer copy(sal_Int32 beginIndex, sal_Int32 count) const
Returns a new string buffer that is a substring of this string.
Definition: ustrbuf.hxx:1606
definition of a no acquire enum for ctors
Definition: types.h:374
OUStringBuffer & append(const sal_Unicode *str, sal_Int32 len)
Appends the string representation of the char array argument to this string buffer.
Definition: ustrbuf.hxx:598
OUStringBuffer & append(bool b)
Appends the string representation of the bool argument to the string buffer.
Definition: ustrbuf.hxx:721
SAL_DLLPUBLIC sal_Int32 rtl_ustr_valueOfBoolean(sal_Unicode *str, sal_Bool b) SAL_THROW_EXTERN_C()
Create the string representation of a boolean.
OUStringBuffer(T &literal, typename libreoffice_internal::ConstCharArrayDetector< T, libreoffice_internal::Dummy >::Type=libreoffice_internal::Dummy())
Definition: ustrbuf.hxx:144
OUString & operator+=(const OUString &str)
Append a string to this string.
Definition: ustring.hxx:553
OUStringBuffer & appendAscii(const sal_Char *str)
Appends a 8-Bit ASCII character string to this string buffer.
Definition: ustrbuf.hxx:679
OUStringBuffer & append(sal_Int64 l, sal_Int16 radix=10)
Appends the string representation of the long argument to this string buffer.
Definition: ustrbuf.hxx:831
sal_Unicode * appendUninitialized(sal_Int32 length) SAL_RETURNS_NONNULL
Unsafe way to make space for a fixed amount of characters to be appended into this OUStringBuffer.
Definition: ustrbuf.hxx:903
SAL_DLLPUBLIC void rtl_uString_new_WithLength(rtl_uString **newStr, sal_Int32 nLen) SAL_THROW_EXTERN_C()
Allocate a new string containing space for a given number of characters.
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_Int32 lastIndexOf(const OUString &str) const
Returns the index within this string of the last occurrence of the specified substring,...
Definition: ustrbuf.hxx:1445
void setLength(sal_Int32 newLength)
Sets the length of this String buffer.
Definition: ustrbuf.hxx:428
sal_Int32 stripEnd(sal_Unicode c=' ')
Strip the given character from the end of the buffer.
Definition: ustrbuf.hxx:1547
sal_Int32 getLength() const
Returns the length of this string.
Definition: ustring.hxx:654
#define SAL_WARN_UNUSED_RESULT
Use this as markup for functions and methods whose return value must be checked.
Definition: types.h:302
char sal_Char
A legacy synonym for char.
Definition: types.h:120
SAL_DLLPUBLIC rtl_uString * rtl_uStringBuffer_makeStringAndClear(rtl_uString **ppThis, sal_Int32 *nCapacity) SAL_RETURNS_NONNULL
Returns an immutable rtl_uString object, while clearing the string buffer.
#define RTL_USTR_MAX_VALUEOFFLOAT
Definition: ustring.h:1022
SAL_DLLPUBLIC void rtl_uString_newFromLiteral(rtl_uString **newStr, const sal_Char *value, sal_Int32 len, sal_Int32 allocExtra) SAL_THROW_EXTERN_C()
void ensureCapacity(sal_Int32 minimumCapacity)
Ensures that the capacity of the buffer is at least equal to the specified minimum.
Definition: ustrbuf.hxx:405
bool isEmpty() const
Checks if a string buffer is empty.
Definition: ustrbuf.hxx:374
OUStringBuffer & append(sal_Bool b)
Appends the string representation of the sal_Bool argument to the string buffer.
Definition: ustrbuf.hxx:758
Definition: stringutils.hxx:105
OUStringBuffer & insert(sal_Int32 offset, sal_Int32 i, sal_Int16 radix=10)
Inserts the string representation of the second sal_Int32 argument into this string buffer.
Definition: ustrbuf.hxx:1126
SAL_DLLPUBLIC sal_Int32 rtl_uStringbuffer_newFromStringBuffer(rtl_uString **newStr, sal_Int32 capacity, rtl_uString *oldStr)
Allocates a new String that contains the same sequence of characters as the string argument.
#define RTL_USTR_MAX_VALUEOFDOUBLE
Definition: ustring.h:1041
const sal_Unicode * getStr() const SAL_RETURNS_NONNULL
Returns a pointer to the Unicode character buffer for this string.
Definition: ustring.hxx:676
This String class provides base functionality for C++ like Unicode character array handling.
Definition: ustring.hxx:126
Dummy Type
Definition: stringutils.hxx:263
~OUStringBuffer()
Release the string data.
Definition: ustrbuf.hxx:336
void accessInternals(rtl_uString ***pInternalData, sal_Int32 **pInternalCapacity)
Allows access to the internal data of this OUStringBuffer, for effective manipulation.
Definition: ustrbuf.hxx:1294
SAL_DLLPUBLIC void rtl_uStringbuffer_insertUtf32(rtl_uString **pThis, sal_Int32 *capacity, sal_Int32 offset, sal_uInt32 c) SAL_THROW_EXTERN_C()
Inserts a single UTF-32 character into this string buffer.
OUStringBuffer & insert(sal_Int32 offset, sal_Unicode c)
Inserts the string representation of the char argument into this string buffer.
Definition: ustrbuf.hxx:1102
OUStringBuffer & insert(sal_Int32 offset, bool b)
Inserts the string representation of the bool argument into this string buffer.
Definition: ustrbuf.hxx:1056
sal_Int32 lastIndexOf(const OUString &str, sal_Int32 fromIndex) const
Returns the index within this string of the last occurrence of the specified substring,...
Definition: ustrbuf.hxx:1470
OUStringBuffer copy(sal_Int32 beginIndex) const
Returns a new string buffer that is a substring of this string.
Definition: ustrbuf.hxx:1588
SAL_DLLPUBLIC void rtl_uString_release(rtl_uString *str) SAL_THROW_EXTERN_C() SAL_HOT
Decrement the reference count of a string.
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: ustrbuf.hxx:1392
Definition: stringutils.hxx:103
sal_Int32 lastIndexOf(sal_Unicode ch, sal_Int32 fromIndex) const
Returns the index within this string of the last occurrence of the specified character,...
Definition: ustrbuf.hxx:1354
sal_Int32 getLength() const
Returns the length (character count) of this string buffer.
Definition: ustrbuf.hxx:361
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.
A string buffer implements a mutable sequence of characters.
Definition: ustrbuf.hxx:65
SAL_DLLPUBLIC void rtl_uStringbuffer_ensureCapacity(rtl_uString **This, sal_Int32 *capacity, sal_Int32 minimumCapacity)
Ensures that the capacity of the buffer is at least equal to the specified minimum.