fmt::print

Formats a string and prints it to the specified file stream using ANSI escape sequences to specify text formatting.

Synopsis

Declared in <fmt/color.h>

template<typename... T>
void
print(
    FILE* f,
    text_style ts,
    format_string<T...> fmt,
    T&&... args);

Description

Example:

fmt::print(fmt::emphasis::bold | fg(fmt::color::red), "Elapsed time: {0:.2f} seconds", 1.23);

Parameters

NameDescription
tsA text style consisting of foreground and background colors and emphasis.