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 | 63b62d66d944265d438bef1575ac2e6e7b6ab1f8 (patch) | |
tree | fde32952e9f381e6e12185ae9af219e99add50f4 /sal/inc/rtl/strbuf.hxx | |
parent | c55545bd95a7e9cb4b838d12ea7b08dc8a097492 (diff) |
add an extra ctor that takes char str+len
Diffstat (limited to 'sal/inc/rtl/strbuf.hxx')
-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 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 <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 ) |