Type: info
         Title: comphelper::string::searchAndReplace
     Posted by: [EMAIL PROTECTED]
      Affected: -
Effective from: SRC680 CWS sb79


*Summary*
--------
+ comphelper/string.hxx

*Description*
-------------
As a result of the thread starting at
<http://www.openoffice.org/servlets/ReadMsg?list=interface-discuss&msgNo=885>,
I
introduced comphelper::string::searchAndReplace at
comphelper/inc/comphelper/string.hxx:1.1.2.1:

// rtl::OUString helper functions that are not widespread or mature
enough to
// go into the stable URE API:
namespace comphelper { namespace string {

/**
   Replace the first occurrence of a substring with another string.

   @param source
   The source string, in which the search will take place.

   @param from
   The ASCII substring to search for.  Must point to at least
fromLength ASCII
   characters.

   @param fromLength
   The length of the from substring.  Must not be negative.

   @param to
   The string to use as replacement.

   @param beginAt
   The index at which to begin the search.  Must be between zero and
the length
   of source, inclusive.

   @param replacedAt
   If non-null, receives the starting index at which the replacement
took place
   or -1 if from was not found.

   @return
   The resulting string, in which the replacement has taken place.
*/
COMPHELPER_DLLPUBLIC rtl::OUString searchAndReplace(
    rtl::OUString const & source, char const * from, sal_Int32 fromLength,
    rtl::OUString const & to, sal_Int32 beginAt = 0,
    sal_Int32 * replacedAt = NULL);

} }


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to