commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Al Chou <hotfusion...@yahoo.com>
Subject Re: [lang] unexpected StringUtils.split behavior (was RE: suggestion for new StringUtils.method)
Date Sat, 22 Nov 2003 06:13:46 GMT
Hi, Phil,

I thought no one would ever ask, and I was sitting here modifying my code to
conform to the existing tests so that I could at least submit my two new
methods.  I'll open a ticket with a patch for those, then open a ticket for my
proposed change in behavior, plus patches to split( String, String, int ) and
my split( String, String, boolean, int ) to implement the change.

Thanks,
Al


--- Phil Steitz <phil@steitz.com> wrote:
> Al Chou wrote:
> 
> > 
> > While testing, I discovered that my expectations for the behavior of the
> split(
> > *, ..., int max ) methods didn't match their actual behavior.  I expected
> to
> > get a maximum of "max" substrings, all of which were delimited in the
> parent
> > string by the specified delimiters.  Instead, what you get is "max - 1"
> such
> > substrings, plus the rest of the parent string as the final result
> substring.
> > This behavior seems counter to what StringTokenizer would do, which is
> > surprising, given the Javadoc comments about using the split methods as
> > alternatives to StringTokenizer.
> > 
> 
> Can you open a Bugzilla ticket and attach a test case that shows the 
> problem and a patch that shows how you think it should be fixed?
> 
> Phil

=====
Albert Davidson Chou

    Get answers to Mac questions at http://www.Mac-Mgrs.org/ .

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message