irc-fun-bot-0.2.0.0: Library for writing fun IRC bots.

Safe HaskellNone
LanguageHaskell2010

Network.IRC.Fun.Bot.Util

Description

This module collects smaller general purpose utilities which may be useful to bot authors.

Synopsis

Documentation

quote :: Quotes -> String -> String Source

Add quotes to a string.

maybeQuote :: Maybe Quotes -> String -> String Source

Optionally add quotes to a string.

showNames Source

Arguments

:: Maybe Quotes

Optionally wrap labels with quotes

-> String

Separate between labels, e.g. spaces or newline

-> [String]

List of labels

-> String 

Format a list of labels.

>>> putStrLn $ showNames (Just $ SingleQuotes False)
>>> ", "
>>> ["one", "two", "three"]
'one', 'two', 'three'