commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <>
Subject Re: [lang] unexpected StringUtils.split behavior (was RE: suggestion for new StringUtils.method)
Date Sat, 22 Nov 2003 04:56:15 GMT
Al Chou wrote:

> While testing, I discovered that my expectations for the behavior of the split(
> *, ..., int max ) methods didn't match their actual behavior.  I expected to
> get a maximum of "max" substrings, all of which were delimited in the parent
> string by the specified delimiters.  Instead, what you get is "max - 1" such
> substrings, plus the rest of the parent string as the final result substring.
> This behavior seems counter to what StringTokenizer would do, which is
> surprising, given the Javadoc comments about using the split methods as
> alternatives to StringTokenizer.

Can you open a Bugzilla ticket and attach a test case that shows the 
problem and a patch that shows how you think it should be fixed?


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

View raw message