diff 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
line wrap: on
line diff
--- a/dwt/dwthelper/utils.d	Thu Oct 23 21:32:32 2008 -0700
+++ b/dwt/dwthelper/utils.d	Sat Oct 25 21:01:54 2008 -0700
@@ -1224,6 +1224,17 @@
     return res;
 }
 
+T[] arrayIndexRemove(T)(T[] arr, uint index) {
+    if (n is 0)
+        return arr[1..$];
+    if (n > arr.length)
+        return arr;
+    if (n is arr.length-1)
+        return arr[0..n-1];
+    // else
+    return arr[0..n] ~ arr[n+1..$];
+}
+ 
 // int seqIndexOf( tango.util.collection.model.Seq.Seq!(Object) seq, Object v ){
 //     int res = -1;
 //     int idx = 0;