You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/12/01 18:46:17 UTC
DO NOT REPLY [Bug 25058] -
Bug in StringUtils.chomp
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25058>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25058
Bug in StringUtils.chomp
apacheBugzilla@AMammenT.cotse.net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |INVALID
------- Additional Comments From apacheBugzilla@AMammenT.cotse.net 2003-12-01 17:46 -------
Although this may not be what you expected, this behaviour is as documented in
the Javadocs (see below). chomp only removes the separator from the end of
the string if it's there. The proposed alternate - substringBeforeLast - may
do more of what you are looking for.
--JAVADOC CLIPPING--
public static String chomp(String str,
String separator)
Removes separator from the end of str if it's there, otherwise leave it alone.
NOTE: This method changed in version 2.0. It now more closely matches Perl
chomp. For the previous behavior, use substringBeforeLast(String, String).
This method uses String.endsWith(String).
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org