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

WordUtils.wrap(String, int) doesn't behave according to JavaDoc

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 3.2.1
    • None
    • lang.text.*
    • None

    Description

      The JavaDoc of WordUtils.wrap(String, int) says that leading white spaces on new lines are stripped from the result. However the following test will fail, since the leading spaces of the second line are not stripped from the resultL

      @Test
      public void testWordUtils_StringInt_LeadingWhitespaces {
              input = "spaces                               spaces";
              expected = "spaces              " + systemNewLine + "spaces";
              assertEquals(expected, WordUtils.wrap(input, 20));
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              britter Benedikt Ritter
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: