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

Add join(..., char c) to StringUtils (and some performance fixes). Even contains tests!

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0
    • 2.0
    • lang.*
    • None
    • Operating System: Linux
      Platform: PC

    • 17882

    Description

      This is a patch to commons.lang to add the following two methods
      to StringUtils

      public static String join(Object[] array, char separator)
      public static String join(Iterator iterator, char separator)

      They're equal to the ..., String separator) methods but take
      a char as second parameter.

      I also took a look at the other join methods and enhanced them for the
      separator == null case.

      The test case for join has been extended for test cases of the new
      methods, tests for the null separator and some test for joining
      an empty array / collection object.

      Please apply.

      Attachments

        Activity

          People

            Unassigned Unassigned
            henning Henning Schmiedehausen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: