commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephan van Hugten (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LANG-619) String prefixing/suffixing
Date Fri, 16 Apr 2010 13:58:28 GMT

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

Stephan van Hugten updated LANG-619:
------------------------------------

    Attachment: StringExtendedUtils.zip

> String prefixing/suffixing
> --------------------------
>
>                 Key: LANG-619
>                 URL: https://issues.apache.org/jira/browse/LANG-619
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>    Affects Versions: 2.5
>            Reporter: Stephan van Hugten
>         Attachments: StringExtendedUtils.zip
>
>
> I had a use case that I wanted to search through a string and, when I found a match,
prefix or suffix (or both) the matching term, i.e. to apply a highlighting class to a matching
keyword in a search.
> I noticed that this cannot be done by the StringUtils framework, so me and a colleague
made this code and would like to donate it to the StringUtils project. In the attachment I
included the class with the extensions plus a Unit test testing all the usecases. I hope you
like it.
> There are 3 methods in the attached class:
> prefix: searches through a string and prefixes a match
> suffix: searches through a string and suffixes a match
> around: does both, prefix or suffix may be null. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message