commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 25058] - Bug in StringUtils.chomp
Date Mon, 01 Dec 2003 17:46:17 GMT
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


Mime
View raw message