(instead of a less efficient items ~= item;)? struct MyStruct { Appender!(string[]) buf; string name;
this(string name) { this.name = name; buf = appender!(string[]); } public addItem(string item) { buf.put(item); } @property string[] items() { return buf.data; } }