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 "offset of _ before _ in _" accessor.
Add a new operation on lists:
the offset of <tNeedle> before <tPosition> in <tList>
This looks for an subsequence equal to <tNeedle> in the subsequence of
<tList> ending at the 1-based index <tPosition> (exclusive). It
returns the 1-based index in <tList> of the first element of the
matching subsequence, or 0 if no matching subsequence is found.
There are two variants of the operation:
the first offset of <tNeedle> before <tPosition> in <tList>
the last offset of <tNeedle> before <tPosition> in <tList>
<tNeedle> must be a List.
Copy file name to clipboardExpand all lines: libscript/src/list.mlc
+38Lines changed: 38 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,7 @@ public foreign handler MCListEvalIndexOfElementBefore(in IsLast as CBool, in Nee
80
80
81
81
public foreign handler MCListEvalOffsetOfList(in IsLast as CBool, in Needle as List, in Haystack as List, out Index as LCUIndex) as undefined binds to "<builtin>"
82
82
public foreign handler MCListEvalOffsetOfListAfter(in IsLast as CBool, in Needle as List, in After as LCIndex, in Haystack as List, out Index as LCUIndex) as undefined binds to "<builtin>"
83
+
public foreign handler MCListEvalOffsetOfListBefore(in IsLast as CBool, in Needle as List, in Before as LCIndex, in Haystack as List, out Index as LCUIndex) as undefined binds to "<builtin>"
0 commit comments