kameloso.string

Various functions that do string manipulation.

Members

Functions

doublyBackslashed
auto doublyBackslashed(string path)

Returns the supplied string with any backslashes doubled. This is to make paths on Windows display properly.

replaceRandom
auto replaceRandom(string line, long defaultLowerBound, long defaultUpperBound)

Replaces $random and $random(i..n) tokens in a string with corresponding random values.

replaceTokens
auto replaceTokens(string line, IRCClient client)

Apply some common text replacements. Used on part and quit reasons.

replaceTokens
auto replaceTokens(string line)

Apply some common text replacements. Used on part and quit reasons. Overload that doesn't take an IRCClient and as such can't replace $nickname.

stripSeparatedPrefix
auto stripSeparatedPrefix(string line, string prefix, Flag!"demandSeparatingChars" demandSep)

Strips a prefix word from a string, optionally also stripping away some non-word characters (currently ":;?! ").

Meta