String match = "hello";
String text = "0123456789hello0123456789";
int position = getPosition(match, text); // should be 10, is there such a method?
String match = hello; String text = 0123456789hello0123456789; int position = getPosition(match, text); //
Share
The family of methods that does this are:
int indexOf(String str)indexOf(String str, int fromIndex)int lastIndexOf(String str)lastIndexOf(String str, int fromIndex)