29#include <unordered_map>
42 std::function<std::string(std::vector<std::string>
const&)>
const& fmt);
49 std::string
hexDump(std::string
const& in);
133 std::vector<std::string>
splitString(std::string str,
char delimiter,
bool ignoreEmpty =
false);
141 std::string
mergePath(std::vector<std::string>
const& path);
149 std::vector<std::string>
splitPath(std::string
const& pathString);
173 std::string
stringReplace(std::string input, std::unordered_map<char, char>
const& patterns);
181 std::string
stringReplace(std::string input, std::unordered_map<std::string, std::string>
const& patterns);
188 std::unordered_multimap<std::string, std::string>
splitQueryString(std::string
const& queryString);
195 std::unordered_map<std::string, std::string>
parseHeaders(std::string rawHeaders);
202 std::unordered_multimap<std::string, std::string>
parseCookies(std::string
const& rawCookies);
213 template<
typename KeyType,
typename ValueType,
template<
typename,
typename,
typename...>
class MapType,
typename... Args>
214 std::unordered_multimap<KeyType, ValueType>
toUnorderedMultimap(MapType<KeyType, ValueType, Args...> inputMap) {
215 std::unordered_multimap<KeyType, ValueType> ret;
216 for (
auto const& [k, v] : inputMap) {
std::string toLowercase(std::string s)
std::vector< std::string > splitPath(std::string const &pathString)
std::string mergePath(std::vector< std::string > const &path)
void regexReplaceCallback(std::string &s, std::regex const &rgx, std::function< std::string(std::vector< std::string > const &)> const &fmt)
std::unordered_map< std::string, std::string > parseHeaders(std::string rawHeaders)
std::string hexDump(std::string const &in)
std::string getFileExtension(std::string const &filename)
std::string convertLineEndings(std::string const &in, std::string const &ending)
std::string generateErrorPage(unsigned int httpStatus)
std::unordered_multimap< KeyType, ValueType > toUnorderedMultimap(MapType< KeyType, ValueType, Args... > inputMap)
std::string makeHttpTime(time_t time)
time_t readSmtpTime(std::string const &smtpTime)
time_t readHttpTime(std::string const &httpTime)
std::string contentTypeByExtension(std::string extension)
std::string stringReplace(std::string input, std::unordered_map< char, char > const &patterns)
std::unordered_multimap< std::string, std::string > splitQueryString(std::string const &queryString)
std::string getFileContents(std::string const &path)
std::vector< std::string > splitString(std::string str, char delimiter, bool ignoreEmpty=false)
std::string makeSmtpTime(time_t time)
std::string toUppercase(std::string s)
std::unordered_multimap< std::string, std::string > parseCookies(std::string const &rawCookies)