ee.List.lastIndexOfSubList
Returns the starting position of the last occurrence of target within list, or -1 if there is no such occurrence.
Usage | Returns |
---|
List.lastIndexOfSubList(target) | Integer |
Argument | Type | Details |
---|
this: list | List | |
target | List | |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["This function finds the starting position of the last occurrence of a target list within another list."],["If the target list is not found within the main list, it returns -1."],["It is used specifically for searching for a sublist within a larger list."],["The function is called on a list object and takes the target list as an argument."],["The return value is always an integer representing the index of the last occurrence or -1 if not found."]]],["The `lastIndexOfSubList` function searches a list for the last occurrence of a target sublist. It takes two arguments: the main list and the target sublist. The function returns an integer representing the starting index of the target's last occurrence within the list. If the target is not found, it returns -1. The function is designed for lists and sublists.\n"]]