1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
module ini; import std.stdio; import std.file; import std.array; struct Section_t { string name; string[string][] pairs; } class ConfigParser { File file; string[string][] pairs; int[] section_pos; this(File file) { this.file = file; } auto _parse() { foreach (line; this.file.byLine) { writeln("-> " ~ line); } } }