You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "matt humphreys (JIRA)" <ji...@apache.org> on 2007/06/06 17:30:26 UTC

[jira] Created: (LANG-338) truncateNicely method which avoids truncating in the middle of a word

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


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.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Updated: (LANG-338) truncateNicely method which avoids truncating in the middle of a word

Posted by "Dave Meikle (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LANG-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Meikle updated LANG-338:
-----------------------------

    Attachment: LANG-338.patch

New Patch containing proposed StringUtils.truncateNicely() method as well as  a Unit Test.

> 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: 3.0
>
>         Attachments: 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Commented: (LANG-338) truncateNicely method which avoids truncating in the middle of a word

Posted by "Dave Meikle (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LANG-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505638 ] 

Dave Meikle commented on LANG-338:
----------------------------------

Unit test to follow.

Cheers,
Dave

> 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: 3.0
>
>         Attachments: LANG-338_truncate_nicely.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.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Updated: (LANG-338) truncateNicely method which avoids truncating in the middle of a word

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LANG-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell updated LANG-338:
-------------------------------

    Fix Version/s: 3.0

A few bugs would need fixing first:

http://issues.apache.org/bugzilla/show_bug.cgi?id=35569 (contains 2 other bugs)

http://issues.apache.org/bugzilla/show_bug.cgi?id=36788

and a lot more unit testing. It is a popular tag in the String taglib though, so would ostensibly be a popular function for Lang.

> 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: 3.0
>
>
> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Updated: (LANG-338) truncateNicely method which avoids truncating in the middle of a word

Posted by "Dave Meikle (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LANG-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Meikle updated LANG-338:
-----------------------------

    Attachment: LANG-338_truncate_nicely.patch

Patch to implement truncateNicely.

> 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: 3.0
>
>         Attachments: LANG-338_truncate_nicely.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.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Updated: (LANG-338) truncateNicely method which avoids truncating in the middle of a word

Posted by "Dave Meikle (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LANG-338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Meikle updated LANG-338:
-----------------------------

    Attachment:     (was: LANG-338_truncate_nicely.patch)

> 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: 3.0
>
>
> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org