summaryrefslogtreecommitdiff
path: root/sal/inc/rtl
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-11-11 12:33:10 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-11-18 19:57:23 -0600
commit82a134c1569e9ca10dd096e866afd1b42454a8d2 (patch)
treef48cab640922fcf01938e685def30845eb46f3fb /sal/inc/rtl
parent357a6f8e3b6ac292c7a692fbcddf305744032f70 (diff)
add a variant of OUStringBuffer::remove() to truncate or empty the content
Change-Id: I9f5f6106ec81c33383f5936335dc965b84360116
Diffstat (limited to 'sal/inc/rtl')
-rw-r--r--sal/inc/rtl/ustrbuf.hxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/sal/inc/rtl/ustrbuf.hxx b/sal/inc/rtl/ustrbuf.hxx
index 8400ac98a627..3855ac101d7d 100644
--- a/sal/inc/rtl/ustrbuf.hxx
+++ b/sal/inc/rtl/ustrbuf.hxx
@@ -919,6 +919,20 @@ public:
return *this;
}
+ /**
+ Removes the tail of a string buffer start at the indicate position
+
+ start must be >= 0 && <= This->length
+
+ @param start The beginning index, inclusive. default to 0
+ @return this string buffer.
+ */
+ OUStringBuffer & remove( sal_Int32 start = 0)
+ {
+ rtl_uStringbuffer_remove( &pData, start, getLength() - start );
+ return *this;
+ }
+
/** Allows access to the internal data of this OUStringBuffer, for effective
manipulation.