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

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.2, 1.8
    • Fix Version/s: None
    • Labels:
      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

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dlavati David Lavati
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

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