You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 8, 2022. It is now read-only.
I tried implementing a feature like this once by overriding the toString() method for the TextStyle struct, which outputs as an ANSI escape code which sets the colors. This functionality, however, does not belong there.
One approach would be to add a function with the signature
stringcli(TextStyle style);
where you could do the following in the standard writeln
Alternatively, another approach could be to add completely new function, for example scone.writeln(...) which converts each argument which is a TextStyle to a string and calls the appropriate write function within itself.
Enable colors with
std.stdio
'swrite
family.I tried implementing a feature like this once by overriding the
toString()
method for theTextStyle
struct, which outputs as an ANSI escape code which sets the colors. This functionality, however, does not belong there.One approach would be to add a function with the signature
where you could do the following in the standard
writeln
The text was updated successfully, but these errors were encountered: