Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-38

[lang] Rationalize StringUtils slice functions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0
    • lang.*
    • None
    • Operating System: other
      Platform: Other

    • 21841

    Description

      The attached patch modifies the behavior of StringUtils.sliceFirst and
      StringUtils.sliceFirstRemainder to consistently handle <string, delimiter> pairs
      where the delimiter is null, empty or does not occur in the string, as discussed
      on the list.

      The patch also refactors the slice functions to take advantage of
      StringUtils.indexOf and StringUtils.lastIndexOf.

      Attachments

        Activity

          People

            Unassigned Unassigned
            phil@steitz.com Phil Steitz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: