commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <>
Subject [jira] Closed: (LANG-405) StringUtils.truncate() to cut out middle part of a String
Date Thu, 21 Jan 2010 08:42:54 GMT


Henri Yandell closed LANG-405.

    Resolution: Fixed

Scratch that - I'd incorrectly copied it and had "..". Patch looks good:

svn ci -m "Applying Srihari Reddy's patch from LANG-405, based on Dave Meikle's original patch.
This adds a truncateMiddle method to StringUtils. "
Sending        src/main/java/org/apache/commons/lang3/
Sending        src/test/java/org/apache/commons/lang3/
Transmitting file data ..
Committed revision 901595.

> StringUtils.truncate() to cut out middle part of a String
> ---------------------------------------------------------
>                 Key: LANG-405
>                 URL:
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.*
>    Affects Versions: 2.2
>            Reporter: Gregor B. Rosenauer
>            Priority: Minor
>             Fix For: 3.0
>         Attachments: LANG-405.diff, LANG-405.diff, LANG-405.diff
> It would be handy to have a String method that cuts out the middle part of a String such
that as much as possible is kept from the start and end of the String, but the middle part
is replaced by an ellipsis "..."
> BeOS had a function like this, but it's poorly documented, missing examples:
> e.g.:
> A very long text with unimportant stuff in the middle but interesting start and end to
see if the text is complete.
> becomes:
> A very long see if the text is complete.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message