commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Müller (Updated) (JIRA) <>
Subject [jira] [Updated] (LANG-766) WordUtils.abbreviate support in 3.0
Date Mon, 13 Feb 2012 22:18:59 GMT


Felix Müller updated LANG-766:

    Attachment: LANG-766.patch


I've copied the code from 2.6 and refactored the tests. I tested it against trunk (3.2). See
patch attached.

Maybe it would also be a good idea to make the abrevMarker in StringUtils.abbreviate a parameter?
So that StringUtils is also more flexible.

> WordUtils.abbreviate support in 3.0
> -----------------------------------
>                 Key: LANG-766
>                 URL:
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.text.*
>            Reporter: Mirek Hankus
>         Attachments: LANG-766.patch
> Commons Lang 2.x has method WordUtils.abbreviate(java.lang.String str, int lower, int
upper, java.lang.String appendToEnd), which 
> # operates on words not Strings as StringUtils.abbreviate 
> # it allows to specify what shoud be appended to string (StringUtils.abbreviate always
appends "...")
> In 3.0 there is no such method, but it was very usefull. please add support for WordUtils.abbreviate

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message