Skip to content

Utilities

h@di edited this page Jul 20, 2018 · 1 revision

Some useful function are available in utilities.hpp header:

  • std::string readFile(std::string filePath): returns contents of a file

  • std::string getExtension(std::string filePath): returns extension of a file based on its name

  • void printVector(std::vector<std::string>): prints contents of a vector

  • std::vector<std::string> split(std::string s, std::string d): split string s by delimiter d

  • std::string urlEncode(std::string const &) & std::string urlDecode(std::string const &): url-encode and url-decode a string, specially useful when passing data through url-encoded forms and urls

AP HTTP

Clone this wiki locally