Something std.conv.to-convertible to enwrap in bold.
The passed something, as a string, in IRC bold.
import std.conv : to; alias I = IRCControlCharacter; { immutable line = "kameloso: " ~ ircBold("kameloso"); immutable expected = "kameloso: " ~ I.bold ~ "kameloso" ~ I.bold; assert((line == expected), line); } { immutable number = 1234; immutable line = number.ircBold; immutable expected = I.bold ~ number.to!string ~ I.bold; assert((line == expected), line); } { immutable b = true; immutable line = b.ircBold; immutable expected = I.bold ~ "true" ~ I.bold; assert((line == expected), line); }
Returns the passed something wrapped in between IRC bold control characters.