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

StringUtils join with var args

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.5
    • lang.*
    • None

    Description

      final String apple = "apple";
      final String banana = "banana";
      final String orange = "orange";
      
      final String expected = apple +  SPACE + banana + SPACE + orange;
      final String  actual = join(SPACE, apple, banana, orange);
      
      final int expLength = expected.length();
      final int actLength = actual.length();
      
      assertEquals(expLength, actLength);
      
      assertEquals(expected, actual);
      

      I missed the functionality of joining strings with the space separator in one line. BTW, why space ' ' not a constant field anywhere?

      Attachments

        1. VarArgJoinTest.java
          2 kB
          Gabriele Kahlout

        Issue Links

          Activity

            People

              britter Benedikt Ritter
              simpatico Gabriele Kahlout
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: