stripIRCTags

Removes <tags> in an outgoing IRC string where the tags correlate to formatting using IRCControlCharacters.

@safe @system
T
stripIRCTags
(
T
)
(
const T line
)

Parameters

line T

String line to remove IRC tags from.

Return Value

Type: T

The passed line but with tags removed.

Examples

import std.typecons : Flag, No, Yes;

{
    immutable line = "hello<b>hello<b>hello";
    immutable expanded = line.stripIRCTags();
    immutable expected = "hellohellohello";
    assert((expanded == expected), expanded);
}
{
    immutable line = "hello<99,99<b>hiho</>";
    immutable expanded = line.stripIRCTags();
    immutable expected = "hello<99,99hiho";
    assert((expanded == expected), expanded);
}
{
    immutable line = "hello<1>hellohello";
    immutable expanded = line.stripIRCTags();
    immutable expected = "hellohellohello";
    assert((expanded == expected), expanded);
}
{
    immutable line = `hello\<h>hello<h>hello<h>hello`;
    immutable expanded = line.stripIRCTags();
    immutable expected = "hello<h>hellohellohello";
    assert((expanded == expected), expanded);
}

Meta