I resume in the 4 ways presented, import std; void main(){ auto a=[1,0,1,1,1,0,1,0,1,1,1,0]; string s = format!"%-(%s%)"(a); writeln(s); dchar[12] b = a.map!(to!string).joiner.array; writeln(b); auto conv = a.to!(ubyte[]); conv[]+='0'; writeln(cast(string)conv);
auto r = a.map!(i => cast(char)(i + '0')); writeln(r); } Why do the last two ways need "auto" as type ?