mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-28 21:07:59 +03:00
feat: add toString for array
This commit is contained in:
@@ -92,6 +92,18 @@ class toml_node
|
||||
ss >> *result;
|
||||
return (result);
|
||||
}
|
||||
case ARRAY:
|
||||
{
|
||||
TOMLArray::iterator it;
|
||||
std::string *result = new std::string("[ ");
|
||||
for (it = value.array->begin(); it != value.array->end(); ++it)
|
||||
{
|
||||
*result += *((*it)->toString());
|
||||
*result += ", ";
|
||||
}
|
||||
*result += " ]";
|
||||
return (result);
|
||||
}
|
||||
default:
|
||||
return ( new std::string("Not implemented :)"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user