mirror of
https://github.com/3lswear/webserv.git
synced 2025-10-29 13:27:59 +03:00
feat: add toString for array
This commit is contained in:
@@ -92,6 +92,18 @@ class toml_node
|
|||||||
ss >> *result;
|
ss >> *result;
|
||||||
return (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:
|
default:
|
||||||
return ( new std::string("Not implemented :)"));
|
return ( new std::string("Not implemented :)"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user