Template Function fmt::v6::format(const text_style&, const S&, const Args&…)

Function Documentation

template<typename S, typename ...Args, typename Char = char_t<S>>
std::basic_string<Char> fmt::v6::format(const text_style &ts, const S &format_str, const Args&... args)

Formats arguments and returns the result as a string using ANSI escape sequences to specify text formatting.

Example*:

#include <fmt/color.h>
std::string message = fmt::format(fmt::emphasis::bold | fg(fmt::color::red),
                                  "The answer is {}", 42);