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

Remove isDelimiter() and use HashSets for delimiter check

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Implemented
    • 1.1
    • 1.2
    • None

    Description

      The current implementation of capitalize, uncapitalize and initials in WordUtils calls isDelimiter for every character and/or codepoint and isDelimiter loops through the array of delimiters to check for the occurrence. This is a bit inefficient and results in O(nk) complexity and it can be reduced to O( n )[if n>k] or O( k ) [if k>n].

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              arunvinud Arun Vinud
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: