LibreOffice
LibreOffice 5.0 SDK C/C++ API Reference
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 <string.h>
27 
28 #include <rtl/strbuf.h>
29 #include <rtl/string.hxx>
30 #include <rtl/stringutils.hxx>
31 
32 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
33 #include <rtl/stringconcat.hxx>
34 #endif
35 
36 // The unittest uses slightly different code to help check that the proper
37 // calls are made. The class is put into a different namespace to make
38 // sure the compiler generates a different (if generating also non-inline)
39 // copy of the function and does not merge them together. The class
40 // is "brought" into the proper rtl namespace by a typedef below.
41 #ifdef RTL_STRING_UNITTEST
42 #define rtl rtlunittest
43 #endif
44 
45 namespace rtl
46 {
47 
49 #ifdef RTL_STRING_UNITTEST
50 #undef rtl
51 // helper macro to make functions appear more readable
52 #define RTL_STRING_CONST_FUNCTION rtl_string_unittest_const_literal_function = true;
53 #else
54 #define RTL_STRING_CONST_FUNCTION
55 #endif
56 
61 {
62 public:
68  : pData(NULL)
69  , nCapacity( 16 )
70  {
71  rtl_string_new_WithLength( &pData, nCapacity );
72  }
73 
80  OStringBuffer( const OStringBuffer & value )
81  : pData(NULL)
82  , nCapacity( value.nCapacity )
83  {
84  rtl_stringbuffer_newFromStringBuffer( &pData, value.nCapacity, value.pData );
85  }
86 
93  explicit OStringBuffer(int length)
94  : pData(NULL)
95  , nCapacity( length )
96  {
97  rtl_string_new_WithLength( &pData, length );
98  }
99 #if __cplusplus >= 201103L
100  explicit OStringBuffer(unsigned int length)
101  : OStringBuffer(static_cast<int>(length))
102  {
103  }
104 #if SAL_TYPES_SIZEOFLONG == 4
105  // additional overloads for sal_Int32 sal_uInt32
106  explicit OStringBuffer(long length)
107  : OStringBuffer(static_cast<int>(length))
108  {
109  }
110  explicit OStringBuffer(unsigned long length)
111  : OStringBuffer(static_cast<int>(length))
112  {
113  }
114 #endif
115  // avoid obvious bugs
116  explicit OStringBuffer(char) = delete;
117  explicit OStringBuffer(sal_Unicode) = delete;
118 #endif
119 
130  OStringBuffer(const OString& value)
131  : pData(NULL)
132  , nCapacity( value.getLength() + 16 )
133  {
134  rtl_stringbuffer_newFromStr_WithLength( &pData, value.getStr(), value.getLength() );
135  }
136 
141  template< typename T >
143  : pData(NULL)
144  {
145  sal_Int32 length = rtl_str_getLength( value );
146  nCapacity = length + 16;
147  rtl_stringbuffer_newFromStr_WithLength( &pData, value, length );
148  }
149 
150  template< typename T >
152  : pData(NULL)
153  {
154  sal_Int32 length = rtl_str_getLength( value );
155  nCapacity = length + 16;
156  rtl_stringbuffer_newFromStr_WithLength( &pData, value, length );
157  }
158 
170  template< typename T >
172  : pData(NULL)
173  , nCapacity( libreoffice_internal::ConstCharArrayDetector< T, void >::size - 1 + 16 )
174  {
175  assert( strlen( literal ) == libreoffice_internal::ConstCharArrayDetector< T >::size - 1 );
177 #ifdef RTL_STRING_UNITTEST
178  rtl_string_unittest_const_literal = true;
179 #endif
180  }
181 
194  OStringBuffer(const sal_Char * value, sal_Int32 length)
195  : pData(NULL)
196  , nCapacity( length + 16 )
197  {
198  rtl_stringbuffer_newFromStr_WithLength( &pData, value, length );
199  }
200 
201 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
202 
206  template< typename T1, typename T2 >
207  OStringBuffer( const OStringConcat< T1, T2 >& c )
208  {
209  const sal_Int32 l = c.length();
210  nCapacity = l + 16;
211  pData = rtl_string_alloc( nCapacity );
212  char* end = c.addData( pData->buffer );
213  *end = '\0';
214  pData->length = end - pData->buffer;
215  }
216 #endif
217 
220  OStringBuffer& operator = ( const OStringBuffer& value )
221  {
222  if (this != &value)
223  {
225  value.nCapacity,
226  value.pData);
227  nCapacity = value.nCapacity;
228  }
229  return *this;
230  }
231 
236  {
237  rtl_string_release( pData );
238  }
239 
249  {
250  OString aRet( pData );
251  rtl_string_new(&pData);
252  nCapacity = 0;
253  return aRet;
254  }
255 
261  sal_Int32 getLength() const
262  {
263  return pData->length;
264  }
265 
274  bool isEmpty() const
275  {
276  return pData->length == 0;
277  }
278 
289  sal_Int32 getCapacity() const
290  {
291  return nCapacity;
292  }
293 
305  void ensureCapacity(sal_Int32 minimumCapacity)
306  {
307  rtl_stringbuffer_ensureCapacity( &pData, &nCapacity, minimumCapacity );
308  }
309 
328  void setLength(sal_Int32 newLength)
329  {
330  assert(newLength >= 0);
331  // Avoid modifications if pData points to const empty string:
332  if( newLength != pData->length )
333  {
334  if( newLength > nCapacity )
335  rtl_stringbuffer_ensureCapacity(&pData, &nCapacity, newLength);
336  else
337  pData->buffer[newLength] = '\0';
338  pData->length = newLength;
339  }
340  }
341 
355  SAL_DEPRECATED("use rtl::OStringBuffer::operator [] instead")
356  sal_Char charAt( sal_Int32 index )
357  {
358  assert(index >= 0 && index < pData->length);
359  return pData->buffer[ index ];
360  }
361 
372  SAL_DEPRECATED("use rtl::OStringBuffer::operator [] instead")
373  OStringBuffer & setCharAt(sal_Int32 index, sal_Char ch)
374  {
375  assert(index >= 0 && index < pData->length);
376  pData->buffer[ index ] = ch;
377  return *this;
378  }
379 
383  const sal_Char* getStr() const { return pData->buffer; }
384 
394  sal_Char & operator [](sal_Int32 index)
395  {
396  assert(index >= 0 && index < pData->length);
397  return pData->buffer[index];
398  }
399 
404  const OString toString() const
405  {
406  return OString(pData->buffer, pData->length);
407  }
408 
420  {
421  return append( str.getStr(), str.getLength() );
422  }
423 
435  template< typename T >
437  {
438  return append( str, rtl_str_getLength( str ) );
439  }
440 
441  template< typename T >
443  {
444  return append( str, rtl_str_getLength( str ) );
445  }
446 
452  template< typename T >
454  {
455  RTL_STRING_CONST_FUNCTION
456  assert( strlen( literal ) == libreoffice_internal::ConstCharArrayDetector< T >::size - 1 );
457  rtl_stringbuffer_insert( &pData, &nCapacity, getLength(), literal, libreoffice_internal::ConstCharArrayDetector< T, void >::size - 1 );
458  return *this;
459  }
460 
474  OStringBuffer & append( const sal_Char * str, sal_Int32 len)
475  {
476  assert( len == 0 || str != 0 ); // cannot assert that in rtl_stringbuffer_insert
477  rtl_stringbuffer_insert( &pData, &nCapacity, getLength(), str, len );
478  return *this;
479  }
480 
481 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
482 
486  template< typename T1, typename T2 >
487  OStringBuffer& append( const OStringConcat< T1, T2 >& c )
488  {
489  const int l = c.length();
490  if( l == 0 )
491  return *this;
492  rtl_stringbuffer_ensureCapacity( &pData, &nCapacity, pData->length + l );
493  char* end = c.addData( pData->buffer + pData->length );
494  *end = '\0';
495  pData->length = end - pData->buffer;
496  return *this;
497  }
498 #endif
499 
512  {
514  return append( sz, rtl_str_valueOfBoolean( sz, b ) );
515  }
516 
531  {
533  return append( sz, rtl_str_valueOfBoolean( sz, b ) );
534  }
535 
537  // Pointer can be automatically converted to bool, which is unwanted here.
538  // Explicitly delete all pointer append() overloads to prevent this
539  // (except for char* overload, which is handled elsewhere).
540  template< typename T >
541  typename libreoffice_internal::Enable< void,
543  append( T* ) SAL_DELETED_FUNCTION;
545 
557  {
558  return append( &c, 1 );
559  }
560 
573  OStringBuffer & append(sal_Int32 i, sal_Int16 radix = 10 )
574  {
576  return append( sz, rtl_str_valueOfInt32( sz, i, radix ) );
577  }
578 
591  OStringBuffer & append(sal_Int64 l, sal_Int16 radix = 10 )
592  {
594  return append( sz, rtl_str_valueOfInt64( sz, l, radix ) );
595  }
596 
609  {
611  return append( sz, rtl_str_valueOfFloat( sz, f ) );
612  }
613 
625  OStringBuffer & append(double d)
626  {
628  return append( sz, rtl_str_valueOfDouble( sz, d ) );
629  }
630 
646  char * appendUninitialized(sal_Int32 length) {
647  sal_Int32 n = getLength();
648  rtl_stringbuffer_insert(&pData, &nCapacity, n, 0, length);
649  return pData->buffer + n;
650  }
651 
667  OStringBuffer & insert(sal_Int32 offset, const OString & str)
668  {
669  return insert( offset, str.getStr(), str.getLength() );
670  }
671 
689  template< typename T >
691  {
692  return insert( offset, str, rtl_str_getLength( str ) );
693  }
694 
695  template< typename T >
697  {
698  return insert( offset, str, rtl_str_getLength( str ) );
699  }
700 
706  template< typename T >
708  {
709  RTL_STRING_CONST_FUNCTION
710  assert( strlen( literal ) == libreoffice_internal::ConstCharArrayDetector< T >::size - 1 );
712  return *this;
713  }
714 
733  OStringBuffer & insert( sal_Int32 offset, const sal_Char * str, sal_Int32 len)
734  {
735  assert( len == 0 || str != 0 ); // cannot assert that in rtl_stringbuffer_insert
736  rtl_stringbuffer_insert( &pData, &nCapacity, offset, str, len );
737  return *this;
738  }
739 
757  OStringBuffer & insert(sal_Int32 offset, sal_Bool b)
758  {
760  return insert( offset, sz, rtl_str_valueOfBoolean( sz, b ) );
761  }
762 
782  OStringBuffer & insert(sal_Int32 offset, bool b)
783  {
785  return insert( offset, sz, rtl_str_valueOfBoolean( sz, b ) );
786  }
787 
804  OStringBuffer & insert(sal_Int32 offset, sal_Char c)
805  {
806  return insert( offset, &c, 1 );
807  }
808 
827  OStringBuffer & insert(sal_Int32 offset, sal_Int32 i, sal_Int16 radix = 10 )
828  {
830  return insert( offset, sz, rtl_str_valueOfInt32( sz, i, radix ) );
831  }
832 
851  OStringBuffer & insert(sal_Int32 offset, sal_Int64 l, sal_Int16 radix = 10 )
852  {
854  return insert( offset, sz, rtl_str_valueOfInt64( sz, l, radix ) );
855  }
856 
874  OStringBuffer insert(sal_Int32 offset, float f)
875  {
877  return insert( offset, sz, rtl_str_valueOfFloat( sz, f ) );
878  }
879 
897  OStringBuffer & insert(sal_Int32 offset, double d)
898  {
900  return insert( offset, sz, rtl_str_valueOfDouble( sz, d ) );
901  }
902 
915  OStringBuffer & remove( sal_Int32 start, sal_Int32 len )
916  {
917  rtl_stringbuffer_remove( &pData, start, len );
918  return *this;
919  }
920 
921 private:
925  rtl_String * pData;
926 
930  sal_Int32 nCapacity;
931 };
932 
933 #ifdef LIBO_INTERNAL_ONLY // "RTL_FAST_STRING"
934 
937 template<>
938 struct ToStringHelper< OStringBuffer >
939  {
940  static int length( const OStringBuffer& s ) { return s.getLength(); }
941  static char* addData( char* buffer, const OStringBuffer& s ) { return addDataHelper( buffer, s.getStr(), s.getLength()); }
942  static const bool allowOStringConcat = true;
943  static const bool allowOUStringConcat = false;
944  };
945 #endif
946 
947 
948 }
949 
950 #ifdef RTL_STRING_UNITTEST
951 namespace rtl
952 {
953 typedef rtlunittest::OStringBuffer OStringBuffer;
954 }
955 #undef RTL_STRING_CONST_FUNCTION
956 #endif
957 
958 #if defined LIBO_INTERNAL_ONLY && !defined RTL_STRING_UNITTEST
959 using ::rtl::OStringBuffer;
960 #endif
961 
962 #endif // INCLUDED_RTL_STRBUF_HXX
963 
964 
965 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define RTL_STR_MAX_VALUEOFINT32
Definition: string.h:627
SAL_DLLPUBLIC void rtl_stringbuffer_remove(rtl_String **This, sal_Int32 start, sal_Int32 len)
Removes the characters in a substring of this sequence.
SAL_DLLPUBLIC void rtl_string_release(rtl_String *str) SAL_THROW_EXTERN_C()
Decrement the reference count of a string.
bool isEmpty() const
Checks if a string buffer is empty.
Definition: strbuf.hxx:274
OStringBuffer & insert(sal_Int32 offset, double d)
Inserts the string representation of the double argument into this string buffer. ...
Definition: strbuf.hxx:897
OStringBuffer & insert(sal_Int32 offset, sal_Bool b)
Inserts the string representation of the sal_Bool argument into this string buffer.
Definition: strbuf.hxx:757
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:733
sal_Int32 getCapacity() const
Returns the current capacity of the String buffer.
Definition: strbuf.hxx:289
OStringBuffer(int length)
Constructs a string buffer with no characters in it and an initial capacity specified by the length a...
Definition: strbuf.hxx:93
void ensureCapacity(sal_Int32 minimumCapacity)
Ensures that the capacity of the buffer is at least equal to the specified minimum.
Definition: strbuf.hxx:305
#define SAL_DELETED_FUNCTION
short-circuit extra-verbose API namespaces
Definition: types.h:404
#define RTL_STR_MAX_VALUEOFDOUBLE
Definition: string.h:711
sal_Int32 getLength() const
Returns the length (character count) of this string buffer.
Definition: strbuf.hxx:261
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:608
OStringBuffer & append(bool b)
Appends the string representation of the bool argument to the string buffer.
Definition: strbuf.hxx:530
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfFloat(sal_Char *str, float f) SAL_THROW_EXTERN_C()
Create the string representation of a float.
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:690
SAL_DLLPUBLIC void rtl_string_newFromLiteral(rtl_String **newStr, const sal_Char *value, sal_Int32 len, sal_Int32 allocExtra) SAL_THROW_EXTERN_C()
char sal_Char
A legacy synonym for char.
Definition: types.h:130
Definition: stringutils.hxx:58
This String class provide base functionality for C++ like 8-Bit character array handling.
Definition: string.hxx:88
const OString toString() const
Return a OString instance reflecting the current content of this OStringBuffer.
Definition: strbuf.hxx:404
OStringBuffer(const OStringBuffer &value)
Allocates a new string buffer that contains the same sequence of characters as the string buffer argu...
Definition: strbuf.hxx:80
unsigned char sal_Bool
Definition: types.h:48
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:851
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:171
OStringBuffer(T &value, typename libreoffice_internal::NonConstCharArrayDetector< T, libreoffice_internal::Dummy >::Type=libreoffice_internal::Dummy())
Definition: strbuf.hxx:151
OStringBuffer & insert(sal_Int32 offset, const OString &str)
Inserts the string into this string buffer.
Definition: strbuf.hxx:667
const sal_Char * getStr() const
Returns a pointer to the characters of this string.
Definition: string.hxx:362
SAL_DLLPUBLIC sal_Int32 rtl_str_getLength(const sal_Char *str) SAL_THROW_EXTERN_C()
Return the length of a string.
OStringBuffer()
Constructs a string buffer with no characters in it and an initial capacity of 16 characters...
Definition: strbuf.hxx:67
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.
SAL_DLLPUBLIC void rtl_string_new(rtl_String **newStr) SAL_THROW_EXTERN_C()
Allocate a new string containing no characters.
#define RTL_STR_MAX_VALUEOFBOOLEAN
Definition: string.h:585
~OStringBuffer()
Release the string data.
Definition: strbuf.hxx:235
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.
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:474
const sal_Char * getStr() const
Return a null terminated character array.
Definition: strbuf.hxx:383
OStringBuffer & insert(sal_Int32 offset, sal_Char c)
Inserts the string representation of the char argument into this string buffer.
Definition: strbuf.hxx:804
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:194
#define RTL_STR_MAX_VALUEOFFLOAT
Definition: string.h:692
void setLength(sal_Int32 newLength)
Sets the length of this String buffer.
Definition: strbuf.hxx:328
#define RTL_STR_MAX_VALUEOFINT64
Definition: string.h:650
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 & append(sal_Int64 l, sal_Int16 radix=10)
Appends the string representation of the long argument to this string buffer.
Definition: strbuf.hxx:591
sal_uInt16 sal_Unicode
Definition: types.h:152
Definition: stringutils.hxx:161
libreoffice_internal::NonConstCharArrayDetector< T, OStringBuffer & >::Type insert(sal_Int32 offset, T &str)
Definition: strbuf.hxx:696
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...
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.
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.
OString makeStringAndClear()
Fill the string data in the new string and clear the buffer.
Definition: strbuf.hxx:248
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:827
OStringBuffer & append(sal_Bool b)
Appends the string representation of the sal_Bool argument to the string buffer.
Definition: strbuf.hxx:511
Definition: stringutils.hxx:60
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(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:142
#define SAL_DEPRECATED(message)
Use as follows: SAL_DEPRECATED("Dont use, its evil.") void doit(int nPara);.
Definition: types.h:495
OStringBuffer & insert(sal_Int32 offset, bool b)
Inserts the string representation of the bool argument into this string buffer.
Definition: strbuf.hxx:782
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:453
OStringBuffer & append(double d)
Appends the string representation of the double argument to this string buffer.
Definition: strbuf.hxx:625
OStringBuffer & append(float f)
Appends the string representation of the float argument to this string buffer.
Definition: strbuf.hxx:608
SAL_DLLPUBLIC sal_Int32 rtl_str_valueOfBoolean(sal_Char *str, sal_Bool b) SAL_THROW_EXTERN_C()
Create the string representation of a boolean.
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:646
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:573
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 append(const T &str)
Appends the string representation of the char array argument to this string buffer.
Definition: strbuf.hxx:436
Definition: bootstrap.hxx:24
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:707
libreoffice_internal::NonConstCharArrayDetector< T, OStringBuffer & >::Type append(T &str)
Definition: strbuf.hxx:442
OStringBuffer(const OString &value)
Constructs a string buffer so that it represents the same sequence of characters as the string argume...
Definition: strbuf.hxx:130
OStringBuffer insert(sal_Int32 offset, float f)
Inserts the string representation of the float argument into this string buffer.
Definition: strbuf.hxx:874
sal_Int32 getLength() const
Returns the length of this string.
Definition: string.hxx:336
A string buffer implements a mutable sequence of characters.
Definition: strbuf.hxx:60
OStringBuffer & append(const OString &str)
Appends the string to this string buffer.
Definition: strbuf.hxx:419
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.