Class PrintTools

java.lang.Object
com.expedient.adventofcodejade.util.PrintTools

public class PrintTools extends Object
Static methods used for formatting text
  • Field Details

    • TERM_WIDTH

      public static final int TERM_WIDTH
      Width of the output terminal, used when formatting headers
      See Also:
  • Constructor Details

    • PrintTools

      public PrintTools()
  • Method Details

    • formatHeader

      public static String formatHeader(String input)
      Creates a nice-looking header containing the given text
      Parameters:
      input - text included in the header
      Returns:
      the formatted header
    • printHelp

      public static void printHelp()
      Print usage information for the command line
    • dayHeader

      public static String dayHeader(int year, int day, boolean isIndex)
      Generate a header for a given day
      Parameters:
      day - day number
      isIndex - whether the day number is an array index (adds 1 to the visual number)
      Returns:
      the formatted header