26 lines
410 B
C++
26 lines
410 B
C++
|
|
#include "utils.hpp"
|
|
|
|
std::vector<std::string> split(std::string input, char delimiter)
|
|
{
|
|
std::vector<std::string> answer;
|
|
std::stringstream ss(input);
|
|
std::string temp;
|
|
|
|
while (getline(ss, temp, delimiter))
|
|
answer.push_back(temp);
|
|
|
|
return answer;
|
|
}
|
|
|
|
char* itoa(int n)
|
|
{
|
|
std::stringstream strs;
|
|
char * str;
|
|
|
|
strs << n;
|
|
str = (char*)(strs.str().c_str());
|
|
return (str);
|
|
}
|
|
|