ircUnderlined

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

@safe
ircUnderlined
(
T
)

Parameters

something T

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

Return Value

Type: auto

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

Examples

import std.conv : to;
alias I = IRCControlCharacter;

{
    immutable line = "kameloso: " ~ ircUnderlined("kameloso");
    immutable expected = "kameloso: " ~ I.underlined ~ "kameloso" ~ I.underlined;
    assert((line == expected), line);
}
{
    immutable number = 1234;
    immutable line = number.ircUnderlined;
    immutable expected = I.underlined ~ number.to!string ~ I.underlined;
    assert((line == expected), line);
}
{
    immutable b = true;
    immutable line = b.ircUnderlined;
    immutable expected = I.underlined ~ "true" ~ I.underlined;
    assert((line == expected), line);
}

Meta