array_remove()

Removes data from array.

Syntax

array_remove(hnd, pos, len);

Parameters

hnd Array handle.
pos Position where we want to remove the data.
0,1,2,3… (zero based numbering is used (1st position has number zero, 2nd number one etc…).
len Length of data to remove.
Return Value Return value is array size. Returned value is integer number.

Example

hnd = array_new();
array_setdata(hnd, 0, 0x01, 0x02, 0x03, 0x04, 0x05);
result = array_printdata(hnd);
array_remove(hnd, 2, 2);
result = array_printdata(hnd);
array_delete(hnd);

result:

5; 0x01, 0x02, 0x03, 0x04, 0x05
3; 0x01, 0x02, 0x05

See also

array_new, array_delete, array_printdata, array_setdata