Class CFormat

java.lang.Object
org.libxmq.imp.xml.CFormat

public final class CFormat extends Object
printf formatting with the semantics of the C library (glibc), for messages that must be identical to the C version: a null string prints as "(null)", a null pointer as "(nil)". Supported: %s %.*s %d %i %u %ld %lu %zu %c %x %02x %g %p %%.
  • Method Details

    • format

      public static String format(String fmt, Object... args)
      Format like snprintf.
      Parameters:
      fmt - The C format.
      args - The arguments (Integer/Long for %d, String for %s, Double for %g, ...).
      Returns:
      The formatted string.