Functions Index :: A :: ArrayDelRange

[<< up one level]

Module:

array :: slices

Definition:

ArrayDelRange(string array, int "start_index", int "end_index")

Description:

Deletes a range of elements from the array passed as argument and returns the resulting array.

Arguments:

array: The array to operate on.

"start_index" (Optional, defaults to 0, ie the first array element): The index of the array element to start deleting from.

"end_index" (Optional, defaults to ArrayLen(array), ie one position past the last array element): The index of the array element to stop deleting (this element is not deleted).

Examples:

a1 = "0.5, 1.0, 1.5, 2.0, 2.5"

a2 = a1.ArrayDelRange() # a2 == "" (empty array)

a3 = a1.ArrayDelRange(0, 2) # a3 == "1.5,2,2.5"

a4 = a1.ArrayDelRange(3) # a4 == "0.5,1,1.5"

a5 = a1.ArrayDelRange(end_index=3) # a5 == "2,2.5"

 

[<< top]