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

StringUtils.join should allow you to pass a range for it (so it only joins a part of the array)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.3
    • lang.*
    • None

    Description

      Currently join, takes an array of objects, adn joins them using a character or string as a separator.

      The problem is that there are many instances where I have an array, but I only want to join part of it. There are various split, etc. I can use to get this to work, but the problem is that they are all inefficient and more work than I think I should have to do.

      I've attached a patch that introduces two new methods to do what I am requesting (one for the string case, one for the character case), as well as additions to the unit tests.

      Attachments

        1. addRangeToJoin.patch
          8 kB
          Will Pugh

        Activity

          People

            Unassigned Unassigned
            willpugh Will Pugh
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: