comparison dwt/dwthelper/utils.d @ 339:c317081df76f

Mozilla module complete (first phase complete)
author John Reimer <terminal.node@gmail.com>
date Sat, 25 Oct 2008 21:01:54 -0700
parents 6f57d3b9947c
children 96243e3ebcf0
comparison
equal deleted inserted replaced
338:d47095c2d585 339:c317081df76f
1222 idx++; 1222 idx++;
1223 } 1223 }
1224 return res; 1224 return res;
1225 } 1225 }
1226 1226
1227 T[] arrayIndexRemove(T)(T[] arr, uint index) {
1228 if (n is 0)
1229 return arr[1..$];
1230 if (n > arr.length)
1231 return arr;
1232 if (n is arr.length-1)
1233 return arr[0..n-1];
1234 // else
1235 return arr[0..n] ~ arr[n+1..$];
1236 }
1237
1227 // int seqIndexOf( tango.util.collection.model.Seq.Seq!(Object) seq, Object v ){ 1238 // int seqIndexOf( tango.util.collection.model.Seq.Seq!(Object) seq, Object v ){
1228 // int res = -1; 1239 // int res = -1;
1229 // int idx = 0; 1240 // int idx = 0;
1230 // foreach( p; seq ){ 1241 // foreach( p; seq ){
1231 // if( p == v){ 1242 // if( p == v){