code: public static String formatTrimmed(Object o, int precision, int length) {
  		return String.format(getTrimmedFormat(getFormat(o, precision), length), o);
  	}
docs: Returns a String representation of the given object using an appropriate
  format and the specified precision in case the object is a non-integer
  number, trimmed to the specified length.
  
  @param o
  Object for which a String representation is desired.
  @param precision
  Desired precision
  @param length
  Length of the trimmed string.
  @return String representation of the given object using an appropriate
  format