public static int locate(String line,int start,int end,int incr,IntPredicate testFunction){
  int ret=-1;
  for (; start != end; start+=incr) {
    if (testFunction.test(line.codePointAt(start))) {
      ret=start;
      break;
    }
  }
  return ret;
}

public static int locate ( String line , int start , int end , int incr , IntPredicate testFunction ) { int ret = - 1 ; for ( ; start != end ; start += incr ) { if ( testFunction . test ( line . codePointAt ( start ) ) ) { ret = start ; break ; } } return ret ; }
locates the index in the line where the testfunction predicates true .
