code: public static String sprintf(Object self, String format, Object[] values) {
          ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
          PrintStream out = new PrintStream(outputStream);
          out.printf(format, values);
          return outputStream.toString();
      }
docs: Sprintf to a string.
  
  @param self   any Object
  @param format a format string
  @param values values referenced by the format specifiers in the format string
  @return the resulting formatted string
  @since 1.5.0