commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Chaffee / Purple Technology <g...@stinky.com>
Subject [lang] chop/chomp/slice finally checked in
Date Sat, 29 Mar 2003 16:28:22 GMT
So I finally found the time to finish modifying chomp() and friends.

More importantly, in writing unit tests for them, I actually
discovered what they do!  Armed with this newfound knowledge, I picked
the following names:

slice  -- remove the last newline and what follows

slice -- remove the last sep and what follows
sliceRemainder -- find the last sep; return what follows

sliceFirst -- remove the first sep and what follows
sliceFirstRemainder -- find the first sep; return what follows

Please check StringUtilsTest if you're confused about the usage.

The old methods (getchomp, prechomp, chompLast, etc.) are now
deprecated.  At some point they should disappear altogether; they
should probably be on the chopping block (or is that chomping block?
:-)) no later than a 3.0 release.

 - A

-- 
Alex Chaffee                               mailto:alex@jguru.com
Purple Technology - Code and Consulting    http://www.purpletech.com/
jGuru - Java News and FAQs                 http://www.jguru.com/alex/
Gamelan - the Original Java site           http://www.gamelan.com/
Stinky - Art and Angst                     http://www.stinky.com/

---------------------------------------------------------------------
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