From eafb82821386e4c14f4a072e4b541dc60f4d7af2 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Thu, 6 Dec 2012 18:48:15 +0100 Subject: OUStringBuffer::remove( int ) -> truncate( int ) Although this may seem consistent with remove( int, int ), it is in fact rather misleading API. The biggest offender is most probably buffer.remove( 'a' ) , which definitely does not do what it suggests to do. Change-Id: I287619cd4b953228b93fa68fb381d66c344c3865 Reviewed-on: https://gerrit.libreoffice.org/1256 Reviewed-by: Michael Stahl Tested-by: Norbert Thiebaud Reviewed-by: Norbert Thiebaud --- sal/inc/rtl/ustrbuf.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sal') diff --git a/sal/inc/rtl/ustrbuf.hxx b/sal/inc/rtl/ustrbuf.hxx index c5c6f5d54337..1397a182457d 100644 --- a/sal/inc/rtl/ustrbuf.hxx +++ b/sal/inc/rtl/ustrbuf.hxx @@ -986,7 +986,7 @@ public: @since LibreOffice 4.0 */ - OUStringBuffer & remove( sal_Int32 start = 0) + OUStringBuffer & truncate( sal_Int32 start = 0 ) { rtl_uStringbuffer_remove( &pData, start, getLength() - start ); return *this; @@ -1240,7 +1240,7 @@ public: } if(index < getLength()) { - remove(index); + truncate(index); } return result - getLength(); } -- cgit