From 63b62d66d944265d438bef1575ac2e6e7b6ab1f8 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sun, 19 Jun 2011 22:59:50 +0100 Subject: add an extra ctor that takes char str+len --- sal/inc/rtl/strbuf.hxx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'sal') diff --git a/sal/inc/rtl/strbuf.hxx b/sal/inc/rtl/strbuf.hxx index ed3ea2c1b637..918f2e6e6fa7 100644 --- a/sal/inc/rtl/strbuf.hxx +++ b/sal/inc/rtl/strbuf.hxx @@ -135,6 +135,25 @@ public: rtl_stringbuffer_newFromStr_WithLength( &pData, value.getStr(), value.getLength() ); } + /** + Constructs a string buffer so that it represents the same + sequence of characters as the string argument. + + The initial + capacity of the string buffer is 16 plus length + + @param value a character array. + @param length the number of character which should be copied. + The character array length must be greater or + equal than this value. + */ + OStringBuffer(const sal_Char * value, sal_Int32 length) + : pData(NULL) + , nCapacity( length + 16 ) + { + rtl_stringbuffer_newFromStr_WithLength( &pData, value, length ); + } + /** Assign to this a copy of value. */ OStringBuffer& operator = ( const OStringBuffer& value ) -- cgit