ItemRemove

Removes an item from a list.

Syntax:

ItemRemove (index, list, delimiter)

Parameters:

(i) index the position in list of the item to be removed.

(s) list a string containing a list of items.

(s) delimiter a character to act as a delimiter between items in the list.

Returns:

(s) new list, with item removed.

 

This function removes the item at the position specified by index from a list. The delimiter following the item is removed as well. It returns a new list, with the specified item removed; the original list (list) is unchanged.

Note: Using -1 as the index will remove the last item in the list.

A single item null list ("") is not a valid list.

Example:


list="apples pears oranges grapes"
index=ItemLocate("oranges", list, " ")
newlist = ItemRemove(index, list, " ")
Message("List after item is removed", newlist)
See Also:

ItemCount, ItemCountCsv, ItemExtract, ItemExtractCsv, ItemInsert, ItemLocate, ItemLocateWild, ItemReplace, ItemSort, Lists Explained