> foreach (g; group(input)) {
> string s = to!string(g._1);
> s ~= g._0; // string ~ dchar wrong, string ~= dchar good
> result ~= s;
> }
Shorter:
foreach (g; group(input))
result ~= text(g._1, g._0);
bearophile