commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject Re: [PATCH][lang] Minor clean-up of Strings.split()
Date Fri, 21 Jun 2002 05:19:38 GMT

Looks good. Why number 2? It doesn't hurt, but I'm not sure if it's any
form of real improvement.

ie) Why -1 to any negative number and not just some form of Constant?

Hen

On Thu, 20 Jun 2002, Christopher Elkins wrote:

> Hi, all.
>
> The attached patch does two things that IMO make the behavior of
> Strings.split() a little more intuitive.
>
> 1. Change the default delimiter to any whitespace from its current
> default of a single space character. This brings split() in line
> with the default behavior of java.util.StringTokenizer and both
> Perl and Python's implementation of split().
>
> 2. Instead of using a magic number to indicate "no limit", accept
> any non-positive value to indicate as such. (The patch also adds a
> couple tests for the corner cases).
>
> --
> Christopher Elkins
>
>


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message