29 #ifndef _RTL_STRBUF_HXX_
30 #define _RTL_STRBUF_HXX_
47 #ifdef RTL_STRING_UNITTEST
48 #define rtl rtlunittest
54 #ifdef RTL_STRING_UNITTEST
57 #define RTL_STRING_CONST_FUNCTION rtl_string_unittest_const_literal_function = true;
59 #define RTL_STRING_CONST_FUNCTION
122 , nCapacity( value.nCapacity )
135 , nCapacity( length )
161 #ifdef HAVE_SFINAE_ANONYMOUS_BROKEN // see the OString ctors
166 nCapacity = length + 16;
170 template<
typename T >
175 nCapacity = length + 16;
179 template<
typename T >
184 nCapacity = length + 16;
199 template<
typename T >
202 , nCapacity( internal::ConstCharArrayDetector< T, void >::size - 1 + 16 )
205 #ifdef RTL_STRING_UNITTEST
206 rtl_string_unittest_const_literal =
true;
209 #endif // HAVE_SFINAE_ANONYMOUS_BROKEN
225 , nCapacity( length + 16 )
239 nCapacity = value.nCapacity;
275 return pData->length;
329 assert(newLength >= 0);
331 if( newLength != pData->length )
333 if( newLength > nCapacity )
336 pData->buffer[newLength] =
'\0';
337 pData->length = newLength;
357 assert(index >= 0 && index < pData->length);
358 return pData->buffer[ index ];
374 assert(index >= 0 && index < pData->length);
375 pData->buffer[ index ] = ch;
401 return OString(pData->buffer, pData->length);
430 #ifdef HAVE_SFINAE_ANONYMOUS_BROKEN
436 template<
typename T >
442 template<
typename T >
453 template<
typename T >
619 #ifdef HAVE_SFINAE_ANONYMOUS_BROKEN
625 template<
typename T >
631 template<
typename T >
642 template<
typename T >
717 return insert( offset, &c, 1 );
844 #ifdef RTL_STRING_UNITTEST
847 typedef rtlunittest::OStringBuffer OStringBuffer;
849 #undef RTL_STRING_CONST_FUNCTION