commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arun Vinud (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TEXT-98) Remove isDelimiter() and use HashSets for delimiter check
Date Mon, 24 Jul 2017 04:06:00 GMT

     [ https://issues.apache.org/jira/browse/TEXT-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Arun Vinud  updated TEXT-98:
----------------------------
    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].
 (was: 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].)

> Remove isDelimiter() and use HashSets for delimiter check
> ---------------------------------------------------------
>
>                 Key: TEXT-98
>                 URL: https://issues.apache.org/jira/browse/TEXT-98
>             Project: Commons Text
>          Issue Type: Improvement
>    Affects Versions: 1.1
>            Reporter: Arun Vinud 
>            Priority: Minor
>             Fix For: 1.2
>
>
> 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].



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message