Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 39978 invoked from network); 21 Jun 2002 05:19:33 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 21 Jun 2002 05:19:33 -0000 Received: (qmail 3118 invoked by uid 97); 21 Jun 2002 05:19:47 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 3102 invoked by uid 97); 21 Jun 2002 05:19:47 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 3090 invoked by uid 98); 21 Jun 2002 05:19:46 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Date: Fri, 21 Jun 2002 01:19:38 -0400 (EDT) From: Henri Yandell X-X-Sender: To: Jakarta Commons Developers List Subject: Re: [PATCH][lang] Minor clean-up of Strings.split() In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: For additional commands, e-mail: