private static int indexOf(final String s,final char searchChar,final int beginIndex,final int endIndex){
  for (int i=beginIndex; i < endIndex; i++) {
    if (s.charAt(i) == searchChar) {
      return i;
    }
  }
  return -1;
}

private static int indexOf ( final String s , final char searchChar , final int beginIndex , final int endIndex ) { for ( int i = beginIndex ; i < endIndex ; i ++ ) { if ( s . charAt ( i ) == searchChar ) { return i ; } } return - 1 ; }
returns the index within the specified string of the first occurrence of the specified search character .
