Syntax:
foundElement = indexf(string$ [,startElement [,indexID]])
Description:
This function searches the index$
array specified by indexID
, for a string which contains the characters specified by string$
. The search begins at the element specified by startElement
. If you omit the startElement
parameter, the search begins at element zero (i.e., at the beginning of the array). If you omit the indexID
parameter, index$
array #0 is searched.
The search is case-sensitive. If a match is found, indexf
returns the element number of the matching element; otherwise, it returns -1. If you specify an index$
array which does not exist (because no space for it has been allocated using the clear <index>
statement), indexf
returns -1.
Example:
elementNumber = indexf("Modem")
This code would find a match with the following index$
elements:
"Modem"
"Modemizing"
"my Modem"
The code would not find a match with these elements:
"modem"
"MODEM"
"horse feathers"
See Also:
CFIndexSort; clear <index>; index$ D; index$ I; index$ function; index$ statement; mem