public static int indexOfThatStartsWith(List<String> list,String startsWith,int startIndex){
  for (int i=startIndex; i < list.size(); i++) {
    String curStr=list.get(i);
    if (curStr != null && curStr.startsWith(startsWith)) {
      return i;
    }
  }
  return -1;
}

public static int indexOfThatStartsWith ( List < String > list , String startsWith , int startIndex ) { for ( int i = startIndex ; i < list . size ( ) ; i ++ ) { String curStr = list . get ( i ) ; if ( curStr != null && curStr . startsWith ( startsWith ) ) { return i ; } } return - 1 ; }
finds the first string that starts with the given string .
