ircBold

Returns the passed something wrapped in between IRC bold control characters.

@safe
ircBold
(
T
)

Parameters

something T

Something std.conv.to-convertible to enwrap in bold.

Return Value

Type: auto

The passed something, as a string, in IRC bold.

Examples

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);
}