You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
com.livecode.list: Add "index of _ before _ in _" accessor.
Add a new operation on lists:
the index of <tNeedle> before <tPosition> in <tList>
This looks for an element equal to <tNeedle> in the subsequence of
<tList> ending at the 1-based index <tPosition> (exclusive). It
returns the 1-based index, or 0 if no element of of the subsequence is
equal to <tNeedle>.
There are two variants of the operation:
the first index of <tNeedle> before <tPosition> in <tList>
the last index of <tNeedle> before <tPosition> in <tList>
If <tNeedle> is a list, it is considered as an element of <tList> not
as a subsequence of <tList>.
Copy file name to clipboardExpand all lines: libscript/src/list.mlc
+36Lines changed: 36 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,7 @@ public foreign handler MCListExecDeleteLastElementOf(inout Target as List) as un
76
76
77
77
public foreign handler MCListEvalIndexOfElement(in IsLast as CBool, in Needle as any, in Haystack as List, out Index as LCUIndex) as undefined binds to "<builtin>"
78
78
public foreign handler MCListEvalIndexOfElementAfter(in IsLast as CBool, in Needle as any, in After as LCIndex, in Haystack as List, out Index as LCUIndex) as undefined binds to "<builtin>"
79
+
public foreign handler MCListEvalIndexOfElementBefore(in IsLast as CBool, in Needle as any, in Before as LCIndex, in Haystack as List, out Index as LCUIndex) as undefined binds to "<builtin>"
0 commit comments