resolved merge conflicts, now ConfigParser is even more intertwined with other parts
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
|
||||
|
||||
#include "Webserv.hpp"
|
||||
|
||||
|
||||
#include "utils.hpp"
|
||||
|
||||
std::vector<std::string> split(std::string input, char delimiter)
|
||||
{
|
||||
@@ -34,10 +31,17 @@ bool isNumeric_btw(int low, int high, std::string str)
|
||||
if (std::isdigit(str[i]) == false)
|
||||
return false;
|
||||
}
|
||||
int n = atoi(str.c_str());
|
||||
int n = std::atoi(str.c_str());
|
||||
if (n < low || n > high)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
char* itoa(int n)
|
||||
{
|
||||
std::stringstream strs;
|
||||
|
||||
strs << n;
|
||||
// casts : https://stackoverflow.com/questions/332030/when-should-static-cast-dynamic-cast-const-cast-and-reinterpret-cast-be-used
|
||||
return ( const_cast<char*>( strs.str().c_str() ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user