Name: krT82822 Date: 09/28/99
Consider the following program:
public class StrTest {
public static void main(String[] args){
int x1 = "abc".indexOf("",4);
int x2 = "abc".lastIndexOf("",4);
System.out.println(x1 + " " + x2);
}
}
when run, it prints:
-1 3
This means that indexOf() does not think there is an empty
string beyond the last character, while lastIndexOf does.
In order to keep uniformity, indexOf() should deliver the
same result (3 in the example).
-----------
9/28/99 eval1127@eng -- see also 4252047
(Review ID: 95817)
======================================================================