robik / ConsoleD

Because colors are awesome.
63 stars 11 forks source link

color console output screws up length of string format when used with writefln #26

Open SingingBush opened 8 years ago

SingingBush commented 8 years ago

I expected the following to output "Hello........World" but it comes out as "Hello.World" (had to swap spaces for . due to markdown formatting)

import std.stdio, consoled;

alias GreenText = ColorTheme!(Color.green, Color.black);

void main() {
    writefln("%s %12s", "Hello" GreenText("World"));
}