#ifndef CGI_UTILS_HPP # define CGI_UTILS_HPP # include # include # include # include # include // getenv # define CR "\r" # define LF "\n" # define CRLF CR LF # define CRLF_SIZE 2 # define NPOS std::string::npos # define HTML_BODY_TOP ""\ ""\ " "\ " CGI"\ " "\ " "\ "

cgi

" # define HTML_BODY_BOTTOM " "\ "" std::string trim(std::string str, char del); std::vector split(const std::string & input, std::string delim, char ctrim = '\0'); std::string itos(int n); std::string fill_env(std::string env, std::string tag = "p"); std::string fill_tag(std::string env, std::string tag = "p"); std::string fill_form( std::string form, std::string tag_key = "p", std::string tag_val = "p" ); std::string parse_form_infos(); #endif