From 7ef1190c3e9422998d89df2cf8fcf30bddfc1a03 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 4 Oct 2012 15:06:27 +0200 Subject: Add a 'fromIndex' parameter to OUString::replaceAll This method will be needed for forthcoming String->OUStringBuffer conversions. Change-Id: I001099baaca5cd402aebcd15c031d9060286a8f9 --- sal/inc/rtl/ustring.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'sal/inc/rtl/ustring.h') diff --git a/sal/inc/rtl/ustring.h b/sal/inc/rtl/ustring.h index 231dcdce253a..e056bad4915e 100644 --- a/sal/inc/rtl/ustring.h +++ b/sal/inc/rtl/ustring.h @@ -1519,6 +1519,29 @@ SAL_DLLPUBLIC void SAL_CALL rtl_uString_newReplaceAll( rtl_uString ** newStr, rtl_uString * str, rtl_uString const * from, rtl_uString const * to) SAL_THROW_EXTERN_C(); +/** Create a new string by replacing all occurrences of a given substring with + another substring. + + Replacing subsequent occurrences picks up only after a given replacement. + That is, replacing from "xa" to "xx" in "xaa" results in "xxa", not "xxx". + + @param[in, out] newStr pointer to the new string; must not be null; must + point to null or a valid rtl_uString + + @param str pointer to the original string; must not be null + + @param from pointer to the substring to be replaced; must not be null + + @param to pointer to the replacing substring; must not be null + + @param fromIndex the position in the string where we will begin searching + + @since LibreOffice 3.7 +*/ +SAL_DLLPUBLIC void SAL_CALL rtl_uString_newReplaceAllFromIndex( + rtl_uString ** newStr, rtl_uString * str, rtl_uString const * from, + rtl_uString const * to, sal_Int32 fromIndex) SAL_THROW_EXTERN_C(); + /** Create a new string by replacing all occurrences of a given substring with another substring. -- cgit