public static int indexOfWhitespace(String string,int startindex,int endindex){
  for (int i=startindex; i < endindex; i++) {
    if (CharUtil.isWhitespace(string.charAt(i))) {
      return i;
    }
  }
  return -1;
}

public static int indexOfWhitespace ( String string , int startindex , int endindex ) { for ( int i = startindex ; i < endindex ; i ++ ) { if ( CharUtil . isWhitespace ( string . charAt ( i ) ) ) { return i ; } } return - 1 ; }
returns first index of a whitespace character , starting from specified index offset .
