ListIndexAfter |
Type | operator |
Dictionary | LCB |
Library | LiveCode Builder |
Syntax | the ( first | last ) index of <Needle> after <After> in <Haystack>
|
Associations | com.livecode.list |
Summary | Find the first or last occurrence of Needle within the tail of Haystack
Target:An expression which evaluates to a list.
|
Parameters | Name | Type | Description |
---|
Needle | | An expression which evaluates to any value.
|
After | | An expression which evaluates to a valid index in Target.
|
|
Example | variable tVar as List
variable tOffset as Number
put ["a", "b", "c", "d", "b"]
put the index of "b" after 1 in tVar into tOffset
put the last index of "b" after 2 in tVar into tOffset
|
Values | Name | Type | Description |
---|
return | | Returns the index in Haystack relative to After.
|
|
Description | Use the index of‰?? after to find where particular elements occur
within a list. Starting from but not including the position After,
Haystack is scanned for an element that is equal to Needle, and
the position of the element found is returned. If no element of
Haystack is equal to Needle, the return value is 0.
|
Tags | lists |