Uploaded image for project: 'PUBLIC - Liferay Portal Enterprise Edition'
  1. PUBLIC - Liferay Portal Enterprise Edition
  2. LPE-2302

New StringUtil.replace() method for multi-key-value replacement

    Details

      Description

      A new replace method

      public static String replace(String s, String begin, String end, Map<String, String> values)

      has been added to StringUtil. The new replace() method is similar to the current replaceValues() method. However, unlike replaceValues(), the new method will remove the beginning and ending token from the final string.

      This new method also performs much faster then replaceValues(). To take advantage of this performance boost, all code which uses replaceValues() has been replaced with replace().

      API CHANGES:

      Class: com.liferay.portal.kernel.util.StringUtil

      Method: replaceValues(String s, String begin, String end, Map<String, String> values)
      Status: Deprecated
      New method: replace(String s, String begin, String end, Map<String, String> values)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mingda.yi Kevin Yi (Inactive)
              Reporter:
              brian.chan Brian Chan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  5.1 EE SP6 (5.1.9)
                  5.2 EE SP4 (5.2.8)