commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Inger, Matthew" <>
Subject RE: suggestion for new StringUtils.method
Date Tue, 11 Nov 2003 18:14:22 GMT
In the case here, i don't think there's a conceptual
difference between blank and null.  And by "blank", i
mean a string of length 0.  Since whitespace is stripped,
if i return a null instead, you would never get an empty
string back.  Better to let the user decide to use empty
string or null once they get the results back.

-----Original Message-----
From: Gerry Duprey []
Sent: Tuesday, November 11, 2003 1:08 PM
To: Jakarta Commons Developers List
Subject: Re: suggestion for new StringUtils.method


> String [] undelimit(String input, char separatorChar, char quoteChar);
> a, , b, "c,d,e", "f""g""h",
> would return the following tokens:
> 1- a
> 2- <blank>
> 3- b

Very handy.  I'd suggest that in the above case, the 2nd & 6th entry return
null.  There are times you need to know that there basically wasn't any data

(and empty element) which could be different from a empty string (i.e. "").

Just a thought.


Gerry Duprey
SchoolsOPEN, LLC
123 North Ashley, Suite 120
Ann Arbor, MI 48104
Phone (877) 483-1944 Ext. 401
Fax (734) 661-0819

Visit us Online at

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message