Here's a failed attempt of mine - after the line. I would usually have stuff like the following (right next):

Ini ini;
ini=new Ini( cfg );
ini["section"]["key"] = value;


-----------

import ini;

void main() {
        import std.conv;
        //load
        string data;
        int i;
        foreach(item; parseINI(File("test.ini"))) {
                data ~= item.to!string~"\n";
                writeln("[*", i++, ' ', text(item), "*]");
        }

        //save //#not working!
        data ~= "frog=jump"; // add more information
        data ~= "frog=jump";
        auto file = File("test.ini", "w");
        file.write(data);
        i = 0;
        foreach(item; parseINI(File("test.ini"))) {
                writeln("[+", i++, ' ', text(item), "+]");
        }
}

Reply via email to