Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 77736 invoked from network); 12 Dec 2009 11:08:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Dec 2009 11:08:40 -0000 Received: (qmail 92896 invoked by uid 500); 12 Dec 2009 11:08:40 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 92817 invoked by uid 500); 12 Dec 2009 11:08:40 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 92804 invoked by uid 99); 12 Dec 2009 11:08:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Dec 2009 11:08:40 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Dec 2009 11:08:38 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 15016234C04C for ; Sat, 12 Dec 2009 03:08:18 -0800 (PST) Message-ID: <339368811.1260616098070.JavaMail.jira@brutus> Date: Sat, 12 Dec 2009 11:08:18 +0000 (UTC) From: "Henri Yandell (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (LANG-405) StringUtils.truncate() to cut out middle part of a String In-Reply-To: <12720548.1201881908880.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LANG-405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell updated LANG-405: ------------------------------- Attachment: LANG-405.diff Updating patch with unit tests and minor tweaks (documentation) to Dave's patch. > StringUtils.truncate() to 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 > Affects Versions: 2.2 > Reporter: Gregor B. Rosenauer > Priority: Minor > Fix For: 3.0 > > Attachments: 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.