[Package Index | Mudlib Index | Effect Index]
File /secure/simul_efun/array.c
Contains some simul_efuns.Written by Pinkfish
Method index
- all_environment(object)
This function returns an array of the recursive environments of an object.
- delete(mixed, int, int)
This method deletes and element from an array.
- insert(mixed, mixed, int)
This method inserts an element into the array.
Public Functions
These are functions that everyone can access.
-
all_environment
varargs object * all_environment(object ob)
This function returns an array of the recursive environments of an object.
- Parameters:
ob - The object to check; if not given, this_object() is used
- Returns:
An array where the first element is the object's environment, the
second the environment's environment, and so on
-
delete
mixed delete(mixed arr,
int start,
int len)
This method deletes and element from an array. This is an old method and
should not be used any more. The method can be replaced with the
code "arr[0..start-1] + arr[start+len..]".
- Parameters:
arr - the array to delete an element from
start - the start position to delete from
len - the number of elements to delete
- Returns:
the new array
-
insert
mixed insert(mixed arr,
mixed el,
int pos)
This method inserts an element into the array. This method is obsolete
and should not be used. It inserts an element into the array at the
specified point.
This function accepts strings as well as arrays.
The code to do this is: "arr[0..pos-1] + ({ el }) + arr[pos..]".
- Parameters:
arr - the array to insert the element into.
el - the element to insert
pos - the position at which to insert it
- Returns:
the array with the element inserted into it