mirror of
https://github.com/yamadapc/d-colorize
synced 2024-11-14 21:14:00 +01:00
Update the README example to use cwrite..
.
This closes #5 and encourages people to use the portable API. Just to keep things in sync with dub, I'm also tagging this as v1.0.1.
This commit is contained in:
parent
589c22e38f
commit
8c6dd92b4c
|
@ -15,12 +15,14 @@ This package is registered in the dub registry as
|
|||
|
||||
## Usage
|
||||
```d
|
||||
import std.stdio;
|
||||
import colorize : fg, color;
|
||||
import colorize : fg, color, cwriteln, cwritefln;
|
||||
|
||||
void main()
|
||||
{
|
||||
writeln("This is blue".color(fg.blue));
|
||||
cwriteln("This is blue".color(fg.blue));
|
||||
|
||||
auto c = "red";
|
||||
cwritefln("This is %s".color(c), c);
|
||||
}
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue