You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2010/01/21 19:23:54 UTC
[jira] Commented: (LANG-405) Cut out middle part of a String
[ https://issues.apache.org/jira/browse/LANG-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12803402#action_12803402 ]
Niall Pemberton commented on LANG-405:
--------------------------------------
OK I've renamed the method to abbreviateMiddle()
http://svn.apache.org/viewvc?view=revision&revision=901815
> Cut out middle part of a String
> -------------------------------
>
> Key: LANG-405
> URL: https://issues.apache.org/jira/browse/LANG-405
> 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:
> http://www.beunited.org/bebook/The%20Support%20Kit/String.html#Truncate()
> 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 text...to 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.