Existe alguma método em java que permita procurar uma string dentro de outra istring, como tem a função instr no vb?
indexOf(String str)
Returns the index within this string of the first occurrence of the specified substring.
Por exemplo:
String txt = "Java rula fortemente";
int index = txt.indexOf("rula");
é isto que voçê quer?
Se não me engano ele returna -1 se não encontrar a substring…
PEACE!