23#ifdef CPP_UTILITIES_ESCAPE_CODES_ENABLED_BY_DEFAULT
44 stream <<
"Warning: ";
71 stream <<
"==> ERROR: ";
77 stream <<
"==> WARNING: ";
97 stream <<
" -> ERROR: ";
103 stream <<
" -> WARNING: ";
122 using namespace std::string_view_literals;
127 return "Warning: "sv;
135 return "==> ERROR: "sv;
137 return "==> WARNING: ";
141 return " -> ERROR: "sv;
143 return " -> WARNING: "sv;
150 return std::string_view{};
164 using namespace std::string_view_literals;
167 return "\033[1;31mError: \033[0m\033[1m"sv;
169 return "\033[1;33mWarning: \033[0m\033[1m"sv;
171 return " \033[0m\033[1m"sv;
173 return "\033[1;32m==> \033[0m\033[1m"sv;
175 return "\033[1;32m -> \033[0m\033[1m"sv;
177 return "\033[1;31m==> ERROR: \033[0m\033[1m"sv;
179 return "\033[1;33m==> WARNING: \033[0m\033[1m";
181 return "\033[1;34mInfo: \033[0m\033[1m"sv;
183 return "\033[1;31m -> ERROR: \033[0m\033[1m"sv;
185 return "\033[1;33m -> WARNING: \033[0m\033[1m"sv;
187 return "\033[1;37m==> \033[0m\033[1m"sv;
192 return std::string_view{};
CPP_UTILITIES_EXPORT std::string_view phraseString(Phrases phrase)
Returns a string for the specified phrase without formatting.
void eraseLine(std::ostream &stream)
std::ostream & operator<<(std::ostream &stream, TextAttribute displayAttribute)
CPP_UTILITIES_EXPORT bool enabled
Controls whether the functions inside the EscapeCodes namespace actually make use of escape codes.
void setStyle(std::ostream &stream, TextAttribute displayAttribute=TextAttribute::Reset)
CPP_UTILITIES_EXPORT std::string_view formattedPhraseString(Phrases phrase)
Returns a string for the specified phrase which is formatted using ANSI escape codes.
Phrases
The Phrases enum contains standard phrases which can be printed to any std::ostream and obtained as s...
Contains all utilities provides by the c++utilities library.