Class Formatters


  • public class Formatters
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Formatters()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String format​(java.lang.String format, java.lang.String... args)
      Format a string using string, numeric, and date conversions while the input is strings
      static java.lang.String format​(java.lang.String format, java.util.function.Function<java.lang.String,​java.lang.Boolean> isTruthy, int offset, java.lang.String... args)
      Format a string where the arguments are all strings.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Formatters

        public Formatters()
    • Method Detail

      • format

        public static java.lang.String format​(java.lang.String format,
                                              java.util.function.Function<java.lang.String,​java.lang.Boolean> isTruthy,
                                              int offset,
                                              java.lang.String... args)
        Format a string where the arguments are all strings. The string is formatted with the ROOT Locale.
        Parameters:
        format - the format string
        isTruthy - a function to turn a string into a boolean
        offset - the offset in the arguments array to start at
        args - the arguments
        Returns:
        a formatted string
      • format

        public static java.lang.String format​(java.lang.String format,
                                              java.lang.String... args)
        Format a string using string, numeric, and date conversions while the input is strings
        Parameters:
        format - the format string
        args - the arguments
        Returns:
        a formatted string