s$ = ItemRemove$(s$,n{,d$})

This function removes (deletes) a single item from a delimited string. (s$) is the delimited string and (n) is the item number to be removed. If the item number does not exist in the string the string is not changed. As with all the delimited string functions the delimiter character (d$) is optional and will default to a comma if not specified.

The first item in a delimited string is item zero. This is to match item number to array indexes.

For example:

s$ = "zero,one,two,three,four"
s$ = ItemRemove$(s$,2)

s$ now equals:

s$ = "zero,one,three,four"

Since the delimiter character is not specified a comma is assumed to be the delimiter.

Delimited Strings

Become a Patron