n = ItemLocate(s$,i${,d$})

This command locates the position of the first item in a delimited string (s$) which equals the specified item (i$). 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"
n = ItemLocate(s$,"three")

In this example n would equal 3 since the first item that matches "three" is item number 3. Since the delimiter character is not specified a comma is assumed to be the delimiter.

Delimited Strings

Become a Patron