
EXCLUDE_ARRAY(2)           silmul_efun          EXCLUDE_ARRAY(2)

名称
     exclude_array - 删除参数阵列中的某范围的元素

语法
     varargs mixed *exclude_array(mixed *array,int from, int to);

描述
     Returns a copy  of  "array",  with  elements  in  the  range
     [from..to]  deleted.   The  "to" argument may be omitted, in
     which case exclude_array will delete the element at  "from".
     If both arguments are omitted, exclude_array will delete the
     first element of a copy of array.

     If "from" < 1, the excluded range will begin with the  first
     element  of the array.  If "to" >= the number of elements in
     the array, the excluded range will run from  "from"  to  the
     end of the array.

     EXAMPLES

     arr = ({ "a", "b", "c", "d", "e" });  exclude_array(arr,  2,
     3);  //  returns  ({  "a", "b", "e" }) exclude_array(arr, 2,
     25);// returns ({ "a", "b" }) exclude_array(arr,  -1,  2);//
     returns  ({ "d", "e" }) exclude_array(arr, 1);    // returns
     ({  "a",  "c",  "d",  "e"  })  exclude_array(arr);        //
     returns ({ "b", "c", "d", "e" })

     NOTE:  You  probably  would  never  use  exclude_array(arr),
     since you
            could    achieve    the     same     results     with
     arr[1..sizeof(arr)-1],
            which would be faster since it does not do a function
     call.

作者
     Ichabod@TMI, 1/29/93
     wade@future 4/7/1996 翻译

MudOS Release 0.9         Last change:                   3-19-93

