Smarter SmartText (not fully working)
This commit is contained in:
@@ -23,13 +23,18 @@ const nb::SmartFormatMap TestStream<ST>::Formatters = {
|
||||
}},
|
||||
{2, [](std::string msg, std::string fmt){
|
||||
return "\x1b[1m" + msg + "\x1b[0m";
|
||||
}},
|
||||
{3, [](std::string msg, std::string fmt){
|
||||
return "\x1b[31m" + msg + "\x1b[0m";
|
||||
}}
|
||||
};
|
||||
|
||||
using nb::SmartText;
|
||||
|
||||
int main() {
|
||||
|
||||
auto tout = TestStream(std::cout);
|
||||
tout << nb::SmartText{"Gloop!\n", {2, "32"}};
|
||||
tout << SmartText<SmartText<const char*>>{SmartText<const char*>{"Gloop\n", {3, ""}}, {2, "32"}};
|
||||
tout << 8989 << "\n";
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user