Prints a formatted string using the specified format string and argument.

@param format the format to follow
@param value the value to be formatted
3953
public void printf(String format, Object value) {
        Object object;

        try {
            object = getProperty("out");
        } catch (MissingPropertyException e) {
            DefaultGroovyMethods.printf(System.out, format, value);
            return;
        }

        InvokerHelper.invokeMethod(object, "printf", new Object[] { format, value });
    }
377310
public static void v(String format, Object... args) {
    assertInitialization();
    sLogger.v(format, args);
  }
418010
public String format(Object value) {
    ValueFormatter<Object> valueFormatter = VALUE_FORMATTERS.get(value.getClass());
    if (valueFormatter != null) {
      return valueFormatter.format(this, value);
    } else {
      return value.toString();
    }
  }
438686
public static void print(String template, Object... values) {
		out.print(StrUtil.format(template, values));
	}
891586
public String formatAsString(final String formatPattern, final String value, final Locale locale) {
        return format(formatPattern, value, locale).getText();
    }
299603
public void d(String format, Object... args) {
    println(LogLevel.DEBUG, format, args);
  }
1323078
private Object prettyPrintValueString(final Object value) {
        if (value instanceof String) {
            return value.equals("") ? "\"\"" : value;
        } else {
            return value.toString();
        }
    }
307375
public void w(String format, Object... args) {
    println(LogLevel.WARN, format, args);
  }
1225094
protected String format(String format, Object... args) {

    if (format == null) {
      return null;
    }
    if (args == null) {
      return format;
    }
    StringBuilder buffer = new StringBuilder();
    int argumentIndex = 0;
    int formatStartIndex = 0;
    while (formatStartIndex >= 0) {
      if (argumentIndex >= args.length) {
        // too few arguments given - append the rest of the format string
        buffer.append(format.substring(formatStartIndex));
        formatStartIndex = -1;
      } else {
        int formatEndIndex = format.indexOf("{}");
        if (formatEndIndex == -1) {
          buffer.append(format.substring(formatStartIndex));
          formatStartIndex = -1;
        } else {
          buffer.append(format.substring(formatStartIndex, formatEndIndex));
          formatStartIndex = formatEndIndex + 2;
          buffer.append(args[argumentIndex++]);
        }
      }
    }
    return buffer.toString();
  }
1063965
public static void println(PrintWriter self, Object value) {
        self.println(InvokerHelper.toString(value));
    }
1354467
public void printElement(String elementName, Object value) {
    println("<" + elementName + ">" + (value == null ? "" : escape(value.toString())) + "</" + elementName + ">");
  }
1107176
private void printValue(String name, String value) {

		this.out.println(
				"  " + SimpleAnsi.INTENSITY_BOLD + name
				+ SimpleAnsi.INTENSITY_NORMAL
				+ spaces( PAD - name.length())
				+ "   " + value );
	}
1353575
public static String format(String format, Object... args) {
    return String.format(Locale.US, format, args);
  }
583022
public static final String printDateTime(Date value)
   {
      return (value == null ? null : DATE_FORMAT.get().format(value));
   }
701429
public static void printError(Object caller, String format, Object... args)
	{
		Object msg = String.format(format, args);
		
		printError(caller,msg);
	}
825002
private static String formatValue(String value)
	{
		if(value == null)
			return "";
		
		value = value.trim();
		
		if(value.startsWith("\"")|| value.startsWith("'"))
			value = value.substring(1);
		
		if(value.endsWith("\"")|| value.endsWith("'"))
			value = value.substring(0, value.length() -1);
		
		return value;
	}
575453
private static void display(String format, Object... args) {
        System.out.println(MessageFormatter.arrayFormat(format, args).getMessage());
    }