Page History
...
Examines a string for the occurrence of a specified substring. Returns the starting position of the designated substring in the string. Index() is case sensitive, meaning that the match must be exact. Use indexc() for a case-insensitive match ("Abc" matches "ABC").
...
In the above example, if the last expression had been 4, a 0 (zero) would have resulted because the string A1 does not occur four times. A value of 0 (zero) would have resulted also if the substring "2" had been used because the substring does not exist in the string
See also
Example
This statement checks if a variable contains more than one field.
Code Block |
---|
if Index (var, @FM, 1) then * there are multiple fields end |
This statement removes the second occurrence of "the" from a string.
...