what does array.reverse really does?

jicman jicman_member at pathlink.com
Fri Mar 31 09:51:29 PST 2006


I am trying to get rid of the first item of an array, so I am trying to figure
it out what is the best way.  Right I I thought of this,

char[][] a;
a[0] = "a";
a[1] = "b";
a[2] = "c";
a[3] = "d";

so if I want to get rid of the first one, I do

a = a.reverse
a.length = a.length - 1;
a = a.reverse;

But now I am thinking that what if the array is huge.  So, what does
array.reverse really does?

thanks,

josé





More information about the Digitalmars-d-learn mailing list