String to strip effects from.
A string devoid of effects.
alias I = IRCControlCharacter; enum boldCode = "" ~ I.bold; enum italicsCode = "" ~ I.italics; { immutable withTags = "This is " ~ boldCode ~ "riddled" ~ boldCode ~ " with " ~ italicsCode ~ "tags" ~ italicsCode; immutable without = stripEffects(withTags); assert((without == "This is riddled with tags"), without); } { immutable withTags = "This line has no tags."; immutable without = stripEffects(withTags); assert((without == withTags), without); } { string withTags; immutable without = stripEffects(withTags); assert(!without.length, without); }
Removes all form of mIRC formatting (colours, bold, italics, underlined) from a string.