commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Chaffee / Purple Technology <>
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                     
Purple Technology - Code and Consulting
jGuru - Java News and FAQs       
Gamelan - the Original Java site 
Stinky - Art and Angst           

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message