IRCUser.hostmask

Formats this IRCUser into a hostmask representing its values. Merely wraps toString and returns a newly allocated string.

struct IRCUser
pure @safe const
string
hostmask
()

Return Value

Type: string

A hostmask "*!*@*" string.

Examples

{
    const user = IRCUser("nickname", "ident", "address.tld");
    immutable hostmask = user.hostmask;
    assert((hostmask == "nickname!ident@address.tld"), hostmask);
}
{
    const user = IRCUser("nickname", string.init, "address.tld");
    immutable hostmask = user.hostmask;
    assert((hostmask == "nickname!*@address.tld"), hostmask);
}
{
    const user = IRCUser(string.init, string.init, "address.tld");
    immutable hostmask = user.hostmask;
    assert((hostmask == "*!*@address.tld"), hostmask);
}
{
    const IRCUser user;
    immutable hostmask = user.hostmask;
    assert((hostmask == "*!*@*"), hostmask);
}