11std::string_view
constexpr RESET{
"\033[0m"};
16std::string_view
constexpr RED{
"\033[31m"};
21std::string_view
constexpr GREEN{
"\033[32m"};
43 [[nodiscard]]
static bool isTerminal()
noexcept;
53 static void print(std::vector<std::pair<port_t, bool>>
const &ports);
A utility class for printing formatted output to the terminal.
static void print(std::vector< std::pair< port_t, bool > > const &ports)
Prints to stdout the formated information about the ports accessibility.
static bool isTerminal() noexcept
Checks if stdout is connected to a terminal.
std::string_view constexpr RED
ANSI escape code for red text color.
std::string_view constexpr GREEN
ANSI escape code for green text color.
std::string_view constexpr RESET
ANSI escape code for resetting terminal colors.