Collection extensions

find

collection · standard futureprog, computer function, computer program

Returns: Number (index)

The FIND function accepts an inner function (which must return a boolean) and returns the index position of the first item in the collection that is TRUE for the inner function. If it finds no matches, it will return -1.

For example if you had a CHARACTER COLLECTION, .Find(x, @x.Age > 50) would return the index (position in collection starting at zero) of the first character over the age of 50.

← Back to Collection extensions