On Thursday, 22 January 2015 at 09:26:21 UTC, tcak wrote:
There are convenient constants defined in std.ascii.
import std.ascii;
string arr = lowercase ~ uppercase ~ digits;
// also 'std.ascii.letters' gives ('A' .. 'Z' ~ 'a' .. 'z')
Well, that's just disguising what we can't do.
D has alot of compile time structures, even much complex than
what I asked. So, this type of thing should be doable for
immutable arrays.
If you declare the string as immutable, the concatenation will be
done at compile time.