added trim in utils, added parse request header, mv pdf in docs
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
|
||||
std::vector<std::string> split(std::string input, char delimiter)
|
||||
{
|
||||
std::vector<std::string> answer;
|
||||
std::stringstream ss(input);
|
||||
std::string temp;
|
||||
std::vector<std::string> answer;
|
||||
std::stringstream ss(input);
|
||||
std::string temp;
|
||||
|
||||
while (getline(ss, temp, delimiter))
|
||||
answer.push_back(temp);
|
||||
@@ -13,13 +13,19 @@ std::vector<std::string> split(std::string input, char delimiter)
|
||||
return answer;
|
||||
}
|
||||
|
||||
char* itoa(int n)
|
||||
std::string trim(std::string str, char c)
|
||||
{
|
||||
std::stringstream strs;
|
||||
char * str;
|
||||
str = str.substr(str.find_first_not_of(c));
|
||||
str = str.substr(0, str.find_last_not_of(c) + 1);
|
||||
|
||||
strs << n;
|
||||
str = (char*)(strs.str().c_str());
|
||||
return (str);
|
||||
return str;
|
||||
}
|
||||
|
||||
std::string itoa(int n)
|
||||
{
|
||||
std::stringstream strs;
|
||||
|
||||
strs << n;
|
||||
return ( strs.str() );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user