Formatted output ranges

anonymous via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Apr 11 13:37:16 PDT 2015


On Saturday, 11 April 2015 at 20:10:49 UTC, Dennis Ritchie wrote:
> 	writefln("%(;; %(%s, %),\n%).", [
> 		a[0 .. 15],
> 		a[15 .. 30],
> 		a[30 .. 45],
> 		a[45 .. 60],
> 		a[60 .. 75],
> 		a[75 .. 90],
> 		a[90 .. $]
> 	]);

writefln("%(;; %(%s, %),\n%).", a.chunks(15));


More information about the Digitalmars-d-learn mailing list