[jira] Commented: (LANG-338) truncateNicely method which avoids truncating in the middle of a word
[ https://issues.apache.org/jira/browse/LANG-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985252#action_12985252 ] Henri Yandell commented on LANG-338: Noting that LANG-673 noticed that StringUtils already had an abbreviate method. This has been removed for LANG 3.0. > truncateNicely method which avoids truncating in the middle of a word > - > > Key: LANG-338 > URL: https://issues.apache.org/jira/browse/LANG-338 > Project: Commons Lang > Issue Type: New Feature >Reporter: matt humphreys >Priority: Trivial > Fix For: 2.4 > > Attachments: LANG-338-cleaned.patch, LANG-338.patch > > > as provided by jakarta string taglib. It would be good if this was part of > commons as it doesn't make sense to use a taglib jar for non-web projects. > The taglib javadoc says: > "...It will search for the first space after the lower limit and truncate the > string there. It will also append any string passed as a parameter to the end > of the string. The hard limit can be specified to forcibily truncate a string > (in the case of an extremely long word or such)..." > http://jakarta.apache.org/taglibs/doc/string-doc/string-1.1.0/javadoc/org/apache/taglibs/string/util/StringW.html -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (LANG-338) truncateNicely method which avoids truncating in the middle of a word
[ https://issues.apache.org/jira/browse/LANG-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542168 ] Ben Speakmon commented on LANG-338: --- I also like abbreviate better. > truncateNicely method which avoids truncating in the middle of a word > - > > Key: LANG-338 > URL: https://issues.apache.org/jira/browse/LANG-338 > Project: Commons Lang > Issue Type: New Feature >Reporter: matt humphreys >Priority: Trivial > Fix For: 2.4 > > Attachments: LANG-338-cleaned.patch, LANG-338.patch > > > as provided by jakarta string taglib. It would be good if this was part of > commons as it doesn't make sense to use a taglib jar for non-web projects. > The taglib javadoc says: > "...It will search for the first space after the lower limit and truncate the > string there. It will also append any string passed as a parameter to the end > of the string. The hard limit can be specified to forcibily truncate a string > (in the case of an extremely long word or such)..." > http://jakarta.apache.org/taglibs/doc/string-doc/string-1.1.0/javadoc/org/apache/taglibs/string/util/StringW.html -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (LANG-338) truncateNicely method which avoids truncating in the middle of a word
[ https://issues.apache.org/jira/browse/LANG-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542167 ] Sebb commented on LANG-338: --- +1 to renaming as "abbreviate". -0.5 to calling it truncateNicely Makes it more obvious why one might want to append a string to the truncated version ... > truncateNicely method which avoids truncating in the middle of a word > - > > Key: LANG-338 > URL: https://issues.apache.org/jira/browse/LANG-338 > Project: Commons Lang > Issue Type: New Feature >Reporter: matt humphreys >Priority: Trivial > Fix For: 2.4 > > Attachments: LANG-338-cleaned.patch, LANG-338.patch > > > as provided by jakarta string taglib. It would be good if this was part of > commons as it doesn't make sense to use a taglib jar for non-web projects. > The taglib javadoc says: > "...It will search for the first space after the lower limit and truncate the > string there. It will also append any string passed as a parameter to the end > of the string. The hard limit can be specified to forcibily truncate a string > (in the case of an extremely long word or such)..." > http://jakarta.apache.org/taglibs/doc/string-doc/string-1.1.0/javadoc/org/apache/taglibs/string/util/StringW.html -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (LANG-338) truncateNicely method which avoids truncating in the middle of a word
[ https://issues.apache.org/jira/browse/LANG-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542147 ] Henri Yandell commented on LANG-338: This was flagged to go in Lang very early on, though I can't find the discussion against adding it yet. Everything seems to be +1 when I dig in the archives. PurpleTech Utils had a similar version with the name 'abbreviate'. I think that's a nicer name. Excalibur also has a truncateNicely - making me wonder if the patch to String Taglib had an Avalon history (or vice versa); however the implementations don't look at all similar. It should also go into WordUtils rather than StringUtils. > truncateNicely method which avoids truncating in the middle of a word > - > > Key: LANG-338 > URL: https://issues.apache.org/jira/browse/LANG-338 > Project: Commons Lang > Issue Type: New Feature >Reporter: matt humphreys >Priority: Trivial > Fix For: 2.4 > > Attachments: LANG-338-cleaned.patch, LANG-338.patch > > > as provided by jakarta string taglib. It would be good if this was part of > commons as it doesn't make sense to use a taglib jar for non-web projects. > The taglib javadoc says: > "...It will search for the first space after the lower limit and truncate the > string there. It will also append any string passed as a parameter to the end > of the string. The hard limit can be specified to forcibily truncate a string > (in the case of an extremely long word or such)..." > http://jakarta.apache.org/taglibs/doc/string-doc/string-1.1.0/javadoc/org/apache/taglibs/string/util/StringW.html -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (LANG-338) truncateNicely method which avoids truncating in the middle of a word
[ https://issues.apache.org/jira/browse/LANG-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542062 ] Bjorn Townsend commented on LANG-338: - Also +1, patch looks good. > truncateNicely method which avoids truncating in the middle of a word > - > > Key: LANG-338 > URL: https://issues.apache.org/jira/browse/LANG-338 > Project: Commons Lang > Issue Type: New Feature >Reporter: matt humphreys >Priority: Trivial > Fix For: 2.4 > > Attachments: LANG-338-cleaned.patch, LANG-338.patch > > > as provided by jakarta string taglib. It would be good if this was part of > commons as it doesn't make sense to use a taglib jar for non-web projects. > The taglib javadoc says: > "...It will search for the first space after the lower limit and truncate the > string there. It will also append any string passed as a parameter to the end > of the string. The hard limit can be specified to forcibily truncate a string > (in the case of an extremely long word or such)..." > http://jakarta.apache.org/taglibs/doc/string-doc/string-1.1.0/javadoc/org/apache/taglibs/string/util/StringW.html -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.