feat: add toString for array

This commit is contained in:
3lswear
2022-01-08 00:04:06 +03:00
parent 6710c8450e
commit ceb1926040

View File

@@ -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 :)"));
}