Xbasic
Array findi Method
Syntax
dim Index as N = <array>.findi(A key[,C options[,N Starting]])
Arguments
- key
A value to find in the array.
- optionsCharacter
An Xbasic expression that processes the array element before the find operation.
- StartingNumeric
The index of the first array element to search.
Returns
- IndexNumeric
Returns the index of the first element in the array that matches. Returns 0 if no matching elements are found.
Description
Find a value in the array, using case insensitive search. return the index of the entry, or 0 if not found.
Discussion
The <array>.findi() method is similar to <array>.find(), but it ignores difference in case when comparing strings.
Example
dim a[2] as P a[1].NAME = "Sam" a[1].city = "Boston" a[2].NAME = "Celine" a[2].city = "Ithaca" ? a.find("celine","name") ' celine and Celine don't exactly match because they have a different case 0.000000 ? a.findI("celine","name") 2.000000