array of single-line strings
lines[] is rewritten in place with outdented lines
StringException if indentation is done with different sequences of whitespace characters.
auto str1 = [ " void main()\n", " {\n", " test();\n", " }\n" ]; auto str1Expected = [ "void main()\n", "{\n", " test();\n", "}\n" ]; assert(str1.outdent == str1Expected); auto str2 = [ "void main()\n", " {\n", " test();\n", " }\n" ]; assert(str2.outdent == str2);
Removes one level of indentation from an array of single-line strings.
This uniformly outdents the text as much as possible. Whitespace-only lines are always converted to blank lines.