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:[EMAIL PROTECTED] 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=22692 Attach your source and test files. -AMT P.S. // 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:[EMAIL PROTECTED] 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 = ','; public static final char DEFAULT_QUOTE = '"'; public static final String WHITESPACE = " \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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]