int boundedIndexOf(String string,char search,int start,int end){
  int retValue=string.indexOf(search,start);
  if (retValue >= end) {
    return -1;
  }
  return retValue;
}

int boundedIndexOf ( String string , char search , int start , int end ) { int retValue = string . indexOf ( search , start ) ; if ( retValue >= end ) { return - 1 ; } return retValue ; }
similar to string . indexof , but allows an upper bound ( this is slower in that it will still check string starting at start .
