LibreOffice
LibreOffice 5.2 SDK C/C++ API Reference
strbuf.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_RTL_STRBUF_HXX
21 #define INCLUDED_RTL_STRBUF_HXX
22 
23 #include <sal/config.h>
24 
25 #include <cassert>
26 #include <cstddef>
27 #include <string.h>
28 
29 #include <rtl/strbuf.h>
30 #include <rtl/string.hxx>
31 #include <rtl/stringutils.hxx>
32 
33 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
34 #include <rtl/stringconcat.hxx>
35 #endif
36 
37 // The unittest uses slightly different code to help check that the proper
38 // calls are made. The class is put into a different namespace to make
39 // sure the compiler generates a different (if generating also non-inline)
40 // copy of the function and does not merge them together. The class
41 // is "brought" into the proper rtl namespace by a typedef below.
42 #ifdef RTL_STRING_UNITTEST
43 #define rtl rtlunittest
44 #endif
45 
46 namespace rtl
47 {
48 
50 #ifdef RTL_STRING_UNITTEST
51 #undef rtl
52 // helper macro to make functions appear more readable
53 #define RTL_STRING_CONST_FUNCTION rtl_string_unittest_const_literal_function = true;
54 #else
55 #define RTL_STRING_CONST_FUNCTION
56 #endif
57 
62 {
63 public:
69  : pData(NULL)
70  , nCapacity( 16 )
71  {
72  rtl_string_new_WithLength( &pData, nCapacity );
73  }
74 
81  OStringBuffer( const OStringBuffer & value )
82  : pData(NULL)
83  , nCapacity( value.nCapacity )
84  {
85  rtl_stringbuffer_newFromStringBuffer( &pData, value.nCapacity, value.pData );
86  }
87 
94  explicit OStringBuffer(int length)
95  : pData(NULL)
96  , nCapacity( length )
97  {
98  rtl_string_new_WithLength( &pData, length );
99  }
100 #if __cplusplus >= 201103L
101  explicit OStringBuffer(unsigned int length)
102  : OStringBuffer(static_cast<int>(length))
103  {
104  }
105 #if SAL_TYPES_SIZEOFLONG == 4
106  // additional overloads for sal_Int32 sal_uInt32
107  explicit OStringBuffer(long length)
108  : OStringBuffer(static_cast<int>(length))
109  {
110  }
111  explicit OStringBuffer(unsigned long length)
112  : OStringBuffer(static_cast<int>(length))
113  {
114  }
115 #endif
116  // avoid obvious bugs
117  explicit OStringBuffer(char) = delete;
118  explicit OStringBuffer(sal_Unicode) = delete;
119 #endif
120 
131  OStringBuffer(const OString& value)
132  : pData(NULL)
133  , nCapacity( value.getLength() + 16 )
134  {
135  rtl_stringbuffer_newFromStr_WithLength( &pData, value.getStr(), value.getLength() );
136  }
137 
142  template< typename T >
144  : pData(NULL)
145  {
146  sal_Int32 length = rtl_str_getLength( value );
147  nCapacity = length + 16;
148  rtl_stringbuffer_newFromStr_WithLength( &pData, value, length );
149  }
150 
151  template< typename T >
153  : pData(NULL)
154  {
155  sal_Int32 length = rtl_str_getLength( value );
156  nCapacity = length + 16;
157  rtl_stringbuffer_newFromStr_WithLength( &pData, value, length );
158  }
159 
171  template< typename T >
173  : pData(NULL)
174  , nCapacity( libreoffice_internal::ConstCharArrayDetector<T>::length + 16 )
175  {
176  assert(
179  &pData,
182 #ifdef RTL_STRING_UNITTEST
183  rtl_string_unittest_const_literal = true;
184 #endif
185  }
186 
199  OStringBuffer(const sal_Char * value, sal_Int32 length)
200  : pData(NULL)
201  , nCapacity( length + 16 )
202  {
203  rtl_stringbuffer_newFromStr_WithLength( &pData, value, length );
204  }
205 
206 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
207 
211  template< typename T1, typename T2 >
212  OStringBuffer( const OStringConcat< T1, T2 >& c )
213  {
214  const sal_Int32 l = c.length();
215  nCapacity = l + 16;
216  pData = rtl_string_alloc( nCapacity );
217  char* end = c.addData( pData->buffer );
218  *end = '\0';
219  pData->length = l;
220  }
221 #endif
222 
225  OStringBuffer& operator = ( const OStringBuffer& value )
226  {
227  if (this != &value)
228  {
230  value.nCapacity,
231  value.pData);
232  nCapacity = value.nCapacity;
233  }
234  return *this;
235  }
236 
241  {
242  rtl_string_release( pData );
243  }
244 
254  {
255  OString aRet( pData );
256  rtl_string_new(&pData);
257  nCapacity = 0;
258  return aRet;
259  }
260 
266  sal_Int32 getLength() const
267  {
268  return pData->length;
269  }
270 
279  bool isEmpty() const
280  {
281  return pData->length == 0;
282  }
283 
294  sal_Int32 getCapacity() const
295  {
296  return nCapacity;
297  }
298 
310  void ensureCapacity(sal_Int32 minimumCapacity)
311  {
312  rtl_stringbuffer_ensureCapacity( &pData, &nCapacity, minimumCapacity );
313  }
314 
333  void setLength(sal_Int32 newLength)
334  {
335  assert(newLength >= 0);
336  // Avoid modifications if pData points to const empty string:
337  if( newLength != pData->length )
338  {
339  if( newLength > nCapacity )
340  rtl_stringbuffer_ensureCapacity(&pData, &nCapacity, newLength);
341  else
342  pData->buffer[newLength] = '\0';
343  pData->length = newLength;
344  }
345  }
346 
360  SAL_DEPRECATED("use rtl::OStringBuffer::operator [] instead")
361  sal_Char charAt( sal_Int32 index )
362  {
363  assert(index >= 0 && index < pData->length);
364  return pData->buffer[ index ];
365  }
366 
377  SAL_DEPRECATED("use rtl::OStringBuffer::operator [] instead")
378  OStringBuffer & setCharAt(sal_Int32 index, sal_Char ch)
379  {
380  assert(index >= 0 && index < pData->length);
381  pData->buffer[ index ] = ch;
382  return *this;
383  }
384 
388  const sal_Char* getStr() const { return pData->buffer; }
389 
399  sal_Char & operator [](sal_Int32 index)
400  {
401  assert(index >= 0 && index < pData->length);
402  return pData->buffer[index];
403  }
404 
409  const OString toString() const
410  {
411  return OString(pData->buffer, pData->length);
412  }
413 
425  {
426  return append( str.getStr(), str.getLength() );
427  }
428 
440  template< typename T >
442  {
443  return append( str, rtl_str_getLength( str ) );
444  }
445 
446  template< typename T >
448  {
449  return append( str, rtl_str_getLength( str ) );
450  }
451 
457  template< typename T >
459  {
460  RTL_STRING_CONST_FUNCTION
461  assert(
464  &pData, &nCapacity, getLength(),
467  return *this;
468  }
469 
483  OStringBuffer & append( const sal_Char * str, sal_Int32 len)
484  {
485  assert( len == 0 || str != NULL ); // cannot assert that in rtl_stringbuffer_insert
486  rtl_stringbuffer_insert( &pData, &nCapacity, getLength(), str, len );
487  return *this;
488  }
489 
490 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
491 
495  template< typename T1, typename T2 >
496  OStringBuffer& append( const OStringConcat< T1, T2 >& c )
497  {
498  sal_Int32 l = c.length();
499  if( l == 0 )
500  return *this;
501  l += pData->length;
502  rtl_stringbuffer_ensureCapacity( &pData, &nCapacity, l );
503  char* end = c.addData( pData->buffer + pData->length );
504  *end = '\0';
505  pData->length = l;
506  return *this;
507  }
508 #endif
509 
522  {
524  return append( sz, rtl_str_valueOfBoolean( sz, b ) );
525  }
526 
541  {
543  return append( sz, rtl_str_valueOfBoolean( sz, b ) );
544  }
545 
547  // Pointer can be automatically converted to bool, which is unwanted here.
548  // Explicitly delete all pointer append() overloads to prevent this
549  // (except for char* overload, which is handled elsewhere).
550  template< typename T >
551  typename libreoffice_internal::Enable< void,
553  append( T* ) SAL_DELETED_FUNCTION;
555 
567  {
568  return append( &c, 1 );
569  }
570 
583  OStringBuffer & append(sal_Int32 i, sal_Int16 radix = 10 )
584  {
586  return append( sz, rtl_str_valueOfInt32( sz, i, radix ) );
587  }
588 
601  OStringBuffer & append(sal_Int64 l, sal_Int16 radix = 10 )
602  {
604  return append( sz, rtl_str_valueOfInt64( sz, l, radix ) );
605  }
606 
619  {
621  return append( sz, rtl_str_valueOfFloat( sz, f ) );
622  }
623 
635  OStringBuffer & append(double d)
636  {
638  return append( sz, rtl_str_valueOfDouble( sz, d ) );
639  }
640 
656  char * appendUninitialized(sal_Int32 length) {
657  sal_Int32 n = getLength();
658  rtl_stringbuffer_insert(&pData, &nCapacity, n, NULL, length);
659  return pData->buffer + n;
660  }
661 
677  OStringBuffer & insert(sal_Int32 offset, const OString & str)
678  {
679  return insert( offset, str.getStr(), str.getLength() );
680  }
681 
699  template< typename T >
701  {
702  return insert( offset, str, rtl_str_getLength( str ) );
703  }
704 
705  template< typename T >
707  {
708  return insert( offset, str, rtl_str_getLength( str ) );
709  }
710 
716  template< typename T >
718  {
719  RTL_STRING_CONST_FUNCTION
720  assert(
723  &pData, &nCapacity, offset,
726  return *this;
727  }
728 
747  OStringBuffer & insert( sal_Int32 offset, const sal_Char * str, sal_Int32 len)
748  {
749  assert( len == 0 || str != NULL ); // cannot assert that in rtl_stringbuffer_insert
750  rtl_stringbuffer_insert( &pData, &nCapacity, offset, str, len );
751  return *this;
752  }
753 
771  OStringBuffer & insert(sal_Int32 offset, sal_Bool b)
772  {
774  return insert( offset, sz, rtl_str_valueOfBoolean( sz, b ) );
775  }
776 
796  OStringBuffer & insert(sal_Int32 offset, bool b)
797  {
799  return insert( offset, sz, rtl_str_valueOfBoolean( sz, b ) );
800  }
801 
818  OStringBuffer & insert(sal_Int32 offset, sal_Char c)
819  {
820  return insert( offset, &c, 1 );
821  }
822 
841  OStringBuffer & insert(sal_Int32 offset, sal_Int32 i, sal_Int16 radix = 10 )
842  {
844  return insert( offset, sz, rtl_str_valueOfInt32( sz, i, radix ) );
845  }
846 
865  OStringBuffer & insert(sal_Int32 offset, sal_Int64 l, sal_Int16 radix = 10 )
866  {
868  return insert( offset, sz, rtl_str_valueOfInt64( sz, l, radix ) );
869  }
870 
888  OStringBuffer insert(sal_Int32 offset, float f)
889  {
891  return insert( offset, sz, rtl_str_valueOfFloat( sz, f ) );
892  }
893 
911  OStringBuffer & insert(sal_Int32 offset, double d)
912  {
914  return insert( offset, sz, rtl_str_valueOfDouble( sz, d ) );
915  }
916 
929  OStringBuffer & remove( sal_Int32 start, sal_Int32 len )
930  {
931  rtl_stringbuffer_remove( &pData, start, len );
932  return *this;
933  }
934 
935 private:
939  rtl_String * pData;
940 
944  sal_Int32 nCapacity;
945 };
946 
947 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
948 
951 template<>
952 struct ToStringHelper< OStringBuffer >
953  {
954  static int length( const OStringBuffer& s ) { return s.getLength(); }
955  static char* addData( char* buffer, const OStringBuffer& s ) { return addDataHelper( buffer, s.getStr(), s.getLength()); }
956  static const bool allowOStringConcat = true;
957  static const bool allowOUStringConcat = false;
958  };
959 #endif
960 
961 
962 }
963 
964 #ifdef RTL_STRING_UNITTEST
965 namespace rtl
966 {
967 typedef rtlunittest::OStringBuffer OStringBuffer;
968 }
969 #undef RTL_STRING_CONST_FUNCTION
970 #endif
971 
972 #if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST
973 using ::rtl::OStringBuffer;
974 #endif
975 
976 #endif // INCLUDED_RTL_STRBUF_HXX
977 
978 
979 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OStringBuffer & 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: strbuf.hxx:841
OStringBuffer(T &value, typename libreoffice_internal::NonConstCharArrayDetector< T, libreoffice_internal::Dummy >::Type=libreoffice_internal::Dummy())
Definition: strbuf.hxx:152
#define RTL_STR_MAX_VALUEOFINT32
Definition: string.h:627
OStringBuffer & insert(sal_Int32 offset, double d)
Inserts the string representation of the double argument into this string buffer. ...
Definition: strbuf.hxx:911
libreoffice_internal::ConstCharArrayDetector< T, OStringBuffer &>::Type append(T &literal)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: strbuf.hxx:458
#define RTL_STR_MAX_VALUEOFFLOAT
Definition: string.h:692
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfInt32(sal_Char *str, sal_Int32 i, sal_Int16 radix) SAL_THROW_EXTERN_C()
Create the string representation of an integer.
OStringBuffer(const sal_Char *value, sal_Int32 length)
Constructs a string buffer so that it represents the same sequence of characters as the string argume...
Definition: strbuf.hxx:199
#define RTL_STR_MAX_VALUEOFINT64
Definition: string.h:650
libreoffice_internal::ConstCharArrayDetector< T, OStringBuffer &>::Type insert(sal_Int32 offset, T &literal)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: strbuf.hxx:717
SAL_DLLPUBLIC void rtl_string_newFromLiteral(rtl_String **newStr, const sal_Char *value, sal_Int32 len, sal_Int32 allocExtra) SAL_THROW_EXTERN_C()
OStringBuffer & append(sal_Int32 i, sal_Int16 radix=10)
Appends the string representation of the sal_Int32 argument to this string buffer.
Definition: strbuf.hxx:583
libreoffice_internal::NonConstCharArrayDetector< T, OStringBuffer &>::Type append(T &str)
Definition: strbuf.hxx:447
SAL_DLLPUBLIC void rtl_string_new_WithLength(rtl_String **newStr, sal_Int32 len) SAL_THROW_EXTERN_C()
Allocate a new string containing space for a given number of characters.
sal_Int32 getCapacity() const
Returns the current capacity of the String buffer.
Definition: strbuf.hxx:294
#define SAL_DELETED_FUNCTION
short-circuit extra-verbose API namespaces
Definition: types.h:410
const sal_Char * getStr() const
Returns a pointer to the characters of this string.
Definition: string.hxx:430
OStringBuffer(const OString &value)
Constructs a string buffer so that it represents the same sequence of characters as the string argume...
Definition: strbuf.hxx:131
SAL_DLLPUBLIC void rtl_stringbuffer_insert(rtl_String **This, sal_Int32 *capacity, sal_Int32 offset, const sal_Char *str, sal_Int32 len)
Inserts the string representation of the char array argument into this string buffer.
OStringBuffer & insert(sal_Int32 offset, const sal_Char *str, sal_Int32 len)
Inserts the string representation of the char array argument into this string buffer.
Definition: strbuf.hxx:747
OStringBuffer & append(sal_Bool b)
Appends the string representation of the sal_Bool argument to the string buffer.
Definition: strbuf.hxx:521
SAL_DLLPUBLIC void rtl_string_new(rtl_String **newStr) SAL_THROW_EXTERN_C()
Allocate a new string containing no characters.
OStringBuffer(int length)
Constructs a string buffer with no characters in it and an initial capacity specified by the length a...
Definition: strbuf.hxx:94
OStringBuffer & insert(sal_Int32 offset, sal_Char c)
Inserts the string representation of the char argument into this string buffer.
Definition: strbuf.hxx:818
OStringBuffer & append(const OString &str)
Appends the string to this string buffer.
Definition: strbuf.hxx:424
#define SAL_DEPRECATED(message)
Use as follows: SAL_DEPRECATED("Don&#39;t use, it&#39;s evil.") void doit(int nPara);.
Definition: types.h:509
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:624
SAL_DLLPUBLIC void rtl_stringbuffer_newFromStr_WithLength(rtl_String **newStr, const sal_Char *value, sal_Int32 count)
Allocates a new String that contains characters from the character array argument.
Definition: stringutils.hxx:245
OStringBuffer insert(sal_Int32 offset, float f)
Inserts the string representation of the float argument into this string buffer.
Definition: strbuf.hxx:888
const sal_Char * getStr() const
Return a null terminated character array.
Definition: strbuf.hxx:388
OStringBuffer(T &literal, typename libreoffice_internal::ConstCharArrayDetector< T, libreoffice_internal::Dummy >::Type=libreoffice_internal::Dummy())
Constructs a string buffer so that it represents the same sequence of characters as the string litera...
Definition: strbuf.hxx:172
OStringBuffer(const T &value, typename libreoffice_internal::CharPtrDetector< T, libreoffice_internal::Dummy >::Type=libreoffice_internal::Dummy())
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: strbuf.hxx:143
libreoffice_internal::CharPtrDetector< T, OStringBuffer &>::Type append(const T &str)
Appends the string representation of the char array argument to this string buffer.
Definition: strbuf.hxx:441
void ensureCapacity(sal_Int32 minimumCapacity)
Ensures that the capacity of the buffer is at least equal to the specified minimum.
Definition: strbuf.hxx:310
SAL_DLLPUBLIC void rtl_stringbuffer_remove(rtl_String **This, sal_Int32 start, sal_Int32 len)
Removes the characters in a substring of this sequence.
This String class provide base functionality for C++ like 8-Bit character array handling.
Definition: string.hxx:90
SAL_DLLPUBLIC void rtl_string_release(rtl_String *str) SAL_THROW_EXTERN_C()
Decrement the reference count of a string.
#define RTL_STR_MAX_VALUEOFDOUBLE
Definition: string.h:711
sal_uInt16 sal_Unicode
Definition: types.h:155
unsigned char sal_Bool
Definition: types.h:48
#define RTL_STR_MAX_VALUEOFBOOLEAN
Definition: string.h:585
const OString toString() const
Return a OString instance reflecting the current content of this OStringBuffer.
Definition: strbuf.hxx:409
OStringBuffer & insert(sal_Int32 offset, const OString &str)
Inserts the string into this string buffer.
Definition: strbuf.hxx:677
bool isEmpty() const
Checks if a string buffer is empty.
Definition: strbuf.hxx:279
void setLength(sal_Int32 newLength)
Sets the length of this String buffer.
Definition: strbuf.hxx:333
OStringBuffer & append(const sal_Char *str, sal_Int32 len)
Appends the string representation of the char array argument to this string buffer.
Definition: strbuf.hxx:483
Definition: stringutils.hxx:119
OStringBuffer & insert(sal_Int32 offset, sal_Bool b)
Inserts the string representation of the sal_Bool argument into this string buffer.
Definition: strbuf.hxx:771
SAL_DLLPUBLIC void rtl_stringbuffer_ensureCapacity(rtl_String **This, sal_Int32 *capacity, sal_Int32 minimumCapacity)
Ensures that the capacity of the buffer is at least equal to the specified minimum.
char * appendUninitialized(sal_Int32 length)
Unsafe way to make space for a fixed amount of characters to be appended into this OStringBuffer...
Definition: strbuf.hxx:656
OStringBuffer & append(sal_Int64 l, sal_Int16 radix=10)
Appends the string representation of the long argument to this string buffer.
Definition: strbuf.hxx:601
SAL_DLLPUBLIC sal_Int32 rtl_str_getLength(const sal_Char *str) SAL_THROW_EXTERN_C()
Return the length of a string.
OStringBuffer & append(double d)
Appends the string representation of the double argument to this string buffer.
Definition: strbuf.hxx:635
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfBoolean(sal_Char *str, sal_Bool b) SAL_THROW_EXTERN_C()
Create the string representation of a boolean.
OStringBuffer & append(bool b)
Appends the string representation of the bool argument to the string buffer.
Definition: strbuf.hxx:540
OStringBuffer & append(float f)
Appends the string representation of the float argument to this string buffer.
Definition: strbuf.hxx:618
~OStringBuffer()
Release the string data.
Definition: strbuf.hxx:240
A string buffer implements a mutable sequence of characters.
Definition: strbuf.hxx:61
SAL_DLLPUBLIC sal_Int32 rtl_stringbuffer_newFromStringBuffer(rtl_String **newStr, sal_Int32 capacity, rtl_String *oldStr)
Allocates a new String that contains the same sequence of characters as the string argument...
OStringBuffer & append(sal_Char c)
Appends the string representation of the char argument to this string buffer.
Definition: strbuf.hxx:566
OStringBuffer(const OStringBuffer &value)
Allocates a new string buffer that contains the same sequence of characters as the string buffer argu...
Definition: strbuf.hxx:81
char sal_Char
A legacy synonym for char.
Definition: types.h:130
libreoffice_internal::NonConstCharArrayDetector< T, OStringBuffer &>::Type insert(sal_Int32 offset, T &str)
Definition: strbuf.hxx:706
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfInt64(sal_Char *str, sal_Int64 l, sal_Int16 radix) SAL_THROW_EXTERN_C()
Create the string representation of a long integer.
OStringBuffer & insert(sal_Int32 offset, sal_Int64 l, sal_Int16 radix=10)
Inserts the string representation of the long argument into this string buffer.
Definition: strbuf.hxx:865
Definition: stringutils.hxx:117
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfFloat(sal_Char *str, float f) SAL_THROW_EXTERN_C()
Create the string representation of a float.
OString makeStringAndClear()
Fill the string data in the new string and clear the buffer.
Definition: strbuf.hxx:253
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfDouble(sal_Char *str, double d) SAL_THROW_EXTERN_C()
Create the string representation of a double.
libreoffice_internal::CharPtrDetector< T, OStringBuffer &>::Type insert(sal_Int32 offset, const T &str)
Inserts the string representation of the char array argument into this string buffer.
Definition: strbuf.hxx:700
sal_Int32 getLength() const
Returns the length of this string.
Definition: string.hxx:404
Definition: bootstrap.hxx:29
sal_Int32 getLength() const
Returns the length (character count) of this string buffer.
Definition: strbuf.hxx:266
OStringBuffer & insert(sal_Int32 offset, bool b)
Inserts the string representation of the bool argument into this string buffer.
Definition: strbuf.hxx:796
SAL_DLLPUBLIC rtl_String * rtl_string_alloc(sal_Int32 nLen) SAL_THROW_EXTERN_C()
Allocate a new string containing space for a given number of characters.
OStringBuffer()
Constructs a string buffer with no characters in it and an initial capacity of 16 characters...
Definition: strbuf.hxx:68