stringifyIni

Serializes an IniDocument to a string in INI format.

Examples

auto doc = IniDocument!string([
	IniSection!string(null, [
		IniKeyValuePair!string("key", "value"),
	]),
	IniSection!string("Section 1", [
		IniKeyValuePair!string("key1", "value1"),
		IniKeyValuePair!string("key2", "foo'bar"),
	]),
]);

// Serialize
string ini = stringifyIni(doc);

static immutable expected =
	"key = value\n"
	~ "\n"
	~ "[Section 1]\n"
	~ "key1 = value1\n"
	~ "key2 = \"foo'bar\"\n";
assert(ini == expected);

Meta