private static int compare(int fromIndex,CharSequence left,CharSequence right){
  if (left == null)   return -1;
  if (right == null)   return 1;
  for (int i=fromIndex, n=MathLib.min(left.length(),right.length()); i < n; i++) {
    char c1=left.charAt(i);
    char c2=right.charAt(i);
    if (c1 != c2)     return c1 - c2;
  }
  return left.length() - right.length();
}

private static int compare ( int fromIndex , CharSequence left , CharSequence right ) { if ( left == null ) return - 1 ; if ( right == null ) return 1 ; for ( int i = fromIndex , n = MathLib . min ( left . length ( ) , right . length ( ) ) ; i < n ; i ++ ) { char c1 = left . charAt ( i ) ; char c2 = right . charAt ( i ) ; if ( c1 != c2 ) return c1 - c2 ; } return left . length ( ) - right . length ( ) ; }
compares the two characters sequences starting at the specified index
