}
}
+void array_replace(void* arrayp, void* from, void* to)
+{
+ struct array* array = arrayp;
+ int i;
+
+ for (i=0; i<array->count; i++)
+ {
+ if (array->item[i] == from)
+ array->item[i] = to;
+ }
+}
+
void* array_pop(void* arrayp)
{
struct array* array = arrayp;
extern void array_remove(void* array, void* value);
extern bool array_contains(void* array, void* value);
extern int array_indexof(void* array, void* value);
+extern void array_replace(void* array, void* from, void* to);
#define array_push(a, v) array_append(a, v)
extern void* array_pop(void* array);