commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <p...@steitz.com>
Subject [lang] How should StringUtils.indexOfAny handle "" in search string?
Date Sun, 20 Jul 2003 08:35:34 GMT
Currently, StringUtils.indexOfAny(str, searchStrings) returns 0 if 
searchStrings contains "", but we return -1 if it contains null.  Is 
this the way we want it to work? We should add javadoc in any case.

One more thing. I really like the examples in the javadoc, but in some 
cases they might be clearer/more complete if we used "*" to indicate 
*any* value (i.e., null, "", "  ", "abc", etc).  For example,

StringUtils.indexOfAny(null, *) = -1
StringUtils.indexOfAny(*, null) = -1

I am preparing a patch fixing a few small typos/omissions in the 
StringUtils javadoc.  Is it OK if I use this notation?

Phil


---------------------------------------------------------------------
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