Returns the last index at which a specified item can be found in a list; otherwise, 0 is returned, indicating the item is not present. The list is searched backwards, starting at a given index when specified.
- The list from which the value is to be located.
- The value to locate in the list.
- The index at which to begin the search. A negative index can be used, indicating an offset from the end of the source string.
- The index of the last occurrence of the value; otherwise,
$list: 32 8 65 79 34 8 13 66 18;
// 1. Get the last index of `8`
@debug list.last-index($list, 8);
// 2. Get the last index of `8` starting a specific index
@debug list.last-index($list, 34, -6);