code: public static String getTrimmedFormat(String format, int length) {
  		return String.format('%' + String.format(TRIM_BASE_FORMAT, length), format.substring(1));
  	}
docs: Extends a given format by additional constraints for trimmed
  (length-limited) outputs.<br>
  It assumes that the given String is a valid format.
  
  @param format
  Format to extend
  @param length
  Desired fixed output length for formatted output
  @return Extended version of <code>format</code> by trim-constraints