ASCII art diagram converter: Difference between revisions
Content added Content deleted
(Updated D entry) |
(Updated D entry) |
||
Line 48:
This solution generates anonymous struct code at compile-time, that can be mixed-in inside a struct or class.
<lang d>string makeStructFromDiagram(in string rawDiagram) pure @safe {
import std.conv: text
import std.format: format;
import std.string: strip, splitLines, indexOf;
import std.array: empty, popFront;
|