diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-19 22:59:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-20 11:11:26 +0100 |
commit | c033fb056371181c178f5b53d715c209436bfece (patch) | |
tree | 32c5919e653d0f7cef5d4f42b7990536a666b890 | |
parent | 7bb4ee73a64c82312a93723f70404a0da075932d (diff) |
add an extra ctor that takes char str+len
-rw-r--r-- | sal/inc/rtl/strbuf.hxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sal/inc/rtl/strbuf.hxx b/sal/inc/rtl/strbuf.hxx index 21ff60391..47f2c0b20 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 <code>16</code> 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 ) |