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

This function inserts an item (i$) into a delimited string (s$) at the specified position (n). As with all the delimited string functions the delimiter character (d$) is optional and will default to a comma if not specified.

For example:

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

s$ now equals:

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

In this example "two" is inserted at position 2 within the delimited string. Since the delimiter character is not specified a comma is assumed to be the delimiter.

Delimited Strings

Become a Patron