51 fmt::dynamic_format_arg_store<fmt::format_context> store;
52 for (
const auto ¶m : params) {
53 store.push_back(
style(param.text(), param.styles()));
55 return fmt::vformat(format_str, store);
static const Style bg_green
Green background color.
static const Style white
White foreground color.
static const Style bg_blue
Blue background color.
static const Style faint
Faint text formatting.
static const Style underline
Underline text formatting.
static const Style bg_yellow
Yellow background color.
static const Style italic
Italic text formatting.
static const Style none
No styling applied.
static const Style black
Black foreground color.
static const Style bg_black
Black background color.
static const Style yellow
Yellow foreground color.
static const Style bg_white
White background color.
static const Style bg_magenta
Magenta background color.
static const Style magenta
Magenta foreground color.
static const Style bg_cyan
Cyan background color.
static const Style red
Red foreground color.
static const Style cyan
Cyan foreground color.
static const Style blue
Blue foreground color.
static const Style bold
Bold text formatting.
static const Style bg_red
Red background color.
static const Style green
Green foreground color.
static const Style blink
Blink text formatting.
virtual std::string style(const std::string &text, Style styles) const =0
Applies styling to a text string.
virtual std::string format(const std::string &format_str, const std::vector< FormatParam > ¶ms) const
Formats a string with styled parameters using fmtlib syntax.