ItemCount()


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

This function returns the number of items (fields) in a delimited string. s$ is the delimited string. The optional d$ parameter is the delimiter character. If the delimiter character is not specified the delimiter character defaults to a comma.


For example:

s$ = "John,Smith,Computer Programmer,Mintoris"
n = ItemCount(s$)

In this example n would equal 4 since there are 4 items in this string. Since the delimiter character is not specified a comma is assumed to be the delimiter.


s$ = "MyDir/invoices/daily"
n = ItemCount(s$,"/")

In this example n would equal 3 since there are 3 directories separated by a "/". Here the delimiter is not a comma so it is specified as a "/".



Delimited Strings







Become a Patron