Split by length?

Jonathan M Davis jmdavisProg at gmx.com
Sun Aug 14 20:14:27 PDT 2011


On Monday, August 15, 2011 04:49:59 Andrej Mitrovic wrote:
> Is there something in Phobos with which I could do:
> 
> auto arr = [1, 2, 3, 4, 5, 6];
> 
> int[][] newarr = arr.splitLength(2);
> assert(newarr.length == 3);

I could have sworn that there was a function that did this, but I can't find it 
at the moment.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list