[EMAIL PROTECTED] wrote:
from: Phil Steitz <[EMAIL PROTECTED]>
I assume you also agree that all slice functions should fix "", null, i.e.,
slice[Xxx](null, *) = null, slice[Xxx]("", *) = ""
Yes, these seem like the simple cases.
Stephen
OK. Unless there are objections or someone else commits the changes, I will submit a patch this eve (MST, US) to make and document the changes discussed above, i,e,
<snip>
("abc", "z") = no match = end of "abc" - slice = "abc" - sliceRemainder = "" - sliceFirst = "abc" - sliceFirstRemainder = ""
("abc", "") = first match at start, last match at end - slice = "abc" - sliceRemainder = "" - sliceFirst = "" - sliceFirstRemainder = "abc"
("abc", null) ??? could mean the same as "", or no match. No match strikes me as the better choice.
</snip>
Patch submitted here:
http://issues.apache.org/bugzilla/show_bug.cgi?id=21841
The patch also refactors all of the slice functions to take advantage of (and ensure consistency with) StringUtils.indexOf, lastIndexOf.
Phil
Phil
--------------------------------------------------------------------- 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]
