Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 49368 invoked from network); 8 Dec 2003 13:47:57 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 8 Dec 2003 13:47:57 -0000 Received: (qmail 22419 invoked by uid 500); 8 Dec 2003 13:47:51 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 22366 invoked by uid 500); 8 Dec 2003 13:47:50 -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 22340 invoked from network); 8 Dec 2003 13:47:50 -0000 Received: from unknown (HELO smtp2.synygy.com) (207.106.136.38) by daedalus.apache.org with SMTP; 8 Dec 2003 13:47:50 -0000 Received: from localhost (unknown [127.0.0.1]) by smtp2.synygy.com (Postfix) with ESMTP id ADE13194045 for ; Mon, 8 Dec 2003 08:38:48 -0500 (EST) Received: from smtp2.synygy.com ([127.0.0.1]) by localhost (smtp2.synygy.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10832-08 for ; Mon, 8 Dec 2003 08:38:48 -0500 (EST) Received: from wood.synygy.com (smtp.synygy.com [10.12.0.62]) by smtp2.synygy.com (Postfix) with ESMTP id 21E6C19400C for ; Mon, 8 Dec 2003 08:38:48 -0500 (EST) Received: by smtp.synygy.com with Internet Mail Service (5.5.2653.19) id ; Mon, 8 Dec 2003 08:43:16 -0500 Message-ID: From: "Inger, Matthew" To: 'Jakarta Commons Developers List' Subject: RE: [lang] StringUtils.split() functionality wrt separator repeat s Date: Mon, 8 Dec 2003 08:47:49 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C3BD91.DE8BD740" X-Virus-Scanned: by amavisd-new at synygy.com X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C3BD91.DE8BD740 Content-Type: text/plain try the new "Tokenizer" class. You can get it from CVS. -----Original Message----- From: Ash .. [mailto:equinus100@hotmail.com] Sent: Monday, December 08, 2003 5:46 AM To: commons-dev@jakarta.apache.org Cc: equinus100@hotmail.com Subject: [lang] StringUtils.split() functionality wrt separator repeats The StringUtils.split(), suggest as an alternative to StringTokenizer, ignores adjacent separators. However, I feel that it would be better if they were not ignored, and empty strings be returned when such a case occurs. Or, there be an overloaded option which lets the user specify whether to ignore separator repeats or not. As I see it, it is more often that a separator repeat occurs due to the absence of data in a specified series of, say, cells. Taking the typical case of a CSV file line read, finding two commas would mean a cell is empty, not that the resultant array should have one element less. It must rather have the expected number of elements with the repeat case entailing an empty String. Comments. Ash --------------------------------------------- Run, rabbit run. Dig that hole, forget the sun, And when at last the work is done Don't sit down it's time to dig another one. _________________________________________________________________ Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org ------_=_NextPart_001_01C3BD91.DE8BD740--