Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 61181 invoked from network); 12 Nov 2003 17:11:07 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 12 Nov 2003 17:11:07 -0000 Received: (qmail 70418 invoked by uid 500); 12 Nov 2003 17:10:59 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 70046 invoked by uid 500); 12 Nov 2003 17:10:56 -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 70033 invoked from network); 12 Nov 2003 17:10:56 -0000 Received: from unknown (HELO l0calh0stu1.localh0st.biz) (67.122.116.206) by daedalus.apache.org with SMTP; 12 Nov 2003 17:10:56 -0000 Received: from mail-1.solidusnetworks.com (xchange-internal [192.168.116.20]) by l0calh0stu1.localh0st.biz (8.12.10/8.12.7) with ESMTP id hACGBChe005096 for ; Wed, 12 Nov 2003 08:11:12 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message Subject: RE: SUBMITING new StringUtils.method MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Wed, 12 Nov 2003 09:08:00 -0800 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: SUBMITING new StringUtils.method Thread-Index: AcOpLRo88lZewPdFSWSf5yF4w+uX5wAEiTZw From: "Arun Thomas" To: "Jakarta Commons Developers List" 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 Alas, not in the version of bugzilla in use here. I add Replaces to the beginning of my description for the new attachment. If = that hides too much of the description, then I add a comment which = identifies what attachement is being replaced. =20 -AMT -----Original Message----- From: Inger, Matthew [mailto:inger@Synygy.com]=20 Sent: Wednesday, November 12, 2003 6:59 AM To: 'Jakarta Commons Developers List' Subject: RE: SUBMITING new StringUtils.method Is there any way to delete an attachment. I uploaded a newver version = of the code (to allow for passing of a char[] in the constructor in = addition to String). -----Original Message----- From: Arun Thomas [mailto:arun.thomas@paybytouch.com] Sent: Tuesday, November 11, 2003 7:29 PM To: Jakarta Commons Developers List Subject: SUBMITING new StringUtils.method Goto http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3D22692 Attach your source and test files. -AMT P.S.=20 // defaults to true public boolean isIgnoreLeadingWhitespace(); public void setIgnoreLeadingWhitespace(boolean = ignoreLeadingWhitespace); // defaults to true public boolean isIgnoreTrailingWhitespace(); public void setIgnoreTrailingWhitespace(boolean ignoreTrailingWhitespace); // defaults to false public boolean isTreatEmptyAsNull(); public void setTreatEmptyAsNull(boolean treatEmptyAsNull); The "is" methods read strangely to me. I think they may read better for = both the "is" and "set" methods if the signatures were as follows: // defaults to true public boolean isIgnoringLeadingWhitespace(); public void setIgnoringLeadingWhitespace(boolean ignoreLeadingWhitespace); // defaults to true public boolean isIgnoringTrailingWhitespace(); public void setIgnoringTrailingWhitespace(boolean ignoreTrailingWhitespace); // defaults to false public boolean isTreatingEmptyAsNull(); public void setTreatingEmptyAsNull(boolean treatEmptyAsNull); -----Original Message----- From: Inger, Matthew [mailto:inger@Synygy.com]=20 Sent: Tuesday, November 11, 2003 4:08 PM To: 'Jakarta Commons Developers List' Subject: RE: suggestion for new StringUtils.method I've come up with the following class for this. (I also have a test class which tests a few of the simple cases). Token parsing is done semi-lazily, in that when the first token is requested (or the token count), the whole thing is parsed. And the reset forgets about the tokens, so you can change parameters, and re-parse. public class DelimitedTokenizer { public static final char DEFAULT_DELIMITER =3D ','; public static final char DEFAULT_QUOTE =3D '"'; public static final String WHITESPACE =3D " \t\n\r"; public DelimitedTokenizer(String input); public DelimitedTokenizer(String input, char delim); public DelimitedTokenizer(String input, char delim, char quote); public char getDelim(); public void setDelim(char delim); public char getQuote(); public void setQuote(char quote); // defaults to true public boolean isIgnoreLeadingWhitespace(); public void setIgnoreLeadingWhitespace(boolean = ignoreLeadingWhitespace); // defaults to true public boolean isIgnoreTrailingWhitespace(); public void setIgnoreTrailingWhitespace(boolean ignoreTrailingWhitespace); // defaults to false public boolean isTreatEmptyAsNull(); public void setTreatEmptyAsNull(boolean treatEmptyAsNull); public int countTokens(); public String nextToken(); public void reset(); public String [] getAllTokens(); } Now the question is how to submit it.... -----Original Message----- From: J.Pietschmann [mailto:j3322ptm@yahoo.de] Sent: Tuesday, November 11, 2003 2:28 PM To: Jakarta Commons Developers List Subject: Re: suggestion for new StringUtils.method Inger, Matthew wrote: > String [] undelimit(String input, char separatorChar, char quoteChar); It's a tokenizer. It would be handy to have it as an iterator pattern = too (like StringTokenizer). J.Pietschmann --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org