Uploaded image for project: 'Commons Text'
  1. Commons Text
  2. TEXT-175

WordUtils.capitalizeFully(String) only splits by spaces, instead of any whitespace

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.2, 1.8
    • 1.12.0
    • None

    Description

      Due to the performance improvements in TEXT-98, this no longer works as originally designed:

      • org.apache.commons.text.WordUtils.capitalizeFully("a\tb\nc")
        • should return "A\t\B\nC", but returns "A\t\b\nc" instead
      • org.apache.commons.text.WordUtils.capitalizeFully("a b c")
        • still works as "A B C"

       

      A possible option while keeping the improvements would be to create a static collection of whitespace codepoints and

       

      Tested in 1.8

      Attachments

        Activity

          People

            Unassigned Unassigned
            dlavati David Lavati
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h
                1h