correction of trim in case of str only fill with delim char

+ added a new split, that also does trim, to split without counting newlines
This commit is contained in:
hugogogo
2022-08-10 20:01:23 +02:00
parent c7905ebd19
commit 9a379c835d
5 changed files with 59 additions and 37 deletions

View File

@@ -38,7 +38,7 @@ std::vector<std::string> split(std::string input, char delimiter);
bool isNumeric(std::string str);
bool isNumeric_btw(int low, int high, std::string str);
std::string itos(int n);
std::string trim(std::string str, char c);
std::string trim(std::string str, char del);
http_method str_to_http_method(std::string &str);
std::string http_methods_to_str(unsigned int methods);
int path_is_valid(std::string path);