PandoraBotIRC
1.0.0
An irc bot that acts as a Pandora chatter bot
|
Namespace for general utility functions. More...
Functions | |
bool | isReserved (char const &c) |
std::string | URLEncode (std::string const &s) |
std::string | HTMLEscape (std::string s) |
std::string | HTMLUnEscape (std::string s) |
std::string | stripHtml (std::string const &s) |
template<typename ReverseIter > | |
ReverseIter::iterator_type | make_forward (ReverseIter i) |
std::string | removeLeadingSpaces (std::string const &s) |
std::string | removeTrailingSpaces (std::string const &s) |
Namespace for general utility functions.
std::string pbirc::util::HTMLEscape | ( | std::string | s | ) |
Replaces escape characters in HTML with their proper counterparts.
[in] | s | string to escape |
std::string pbirc::util::HTMLUnEscape | ( | std::string | s | ) |
Does the opposite of HTMLEscape
[in] | s | the string to unescape |
bool pbirc::util::isReserved | ( | char const & | c | ) |
Function checks a character to see if a character is reserved in URLs. A reserved character is used for a special purpose in URLs.
[in] | c | character to be tested. |
ReverseIter::iterator_type pbirc::util::make_forward | ( | ReverseIter | i | ) |
Helper function to convert a reverse_iterator into a forward_iterator
[in] | i | reverse_iterator to be made forward |
std::string pbirc::util::removeLeadingSpaces | ( | std::string const & | s | ) |
Removes the leading spaces from a string
[in] | s | string to remove whitespaces from |
std::string pbirc::util::removeTrailingSpaces | ( | std::string const & | s | ) |
Removes the trailing whitespaces from a string
[in] | s | string to remove trailing whitespaces from |
std::string pbirc::util::stripHtml | ( | std::string const & | s | ) |
Removes all HTML tags from a string.
[in] | s | string to strip html from |
std::string pbirc::util::URLEncode | ( | std::string const & | s | ) |
URL encodes a string – Removes reserved characters and replaces them with hex counterparts. "The quick brown fox" will become "The%20quick%20brown%20fox"
[in] | s | string to encode |