Announcement: All noncommercial projects registered to use Earth Engine before
April 15, 2025 must
verify noncommercial eligibility to maintain Earth Engine access.
ee.List.lastIndexOfSubList
Stay organized with collections
Save and categorize content based on your preferences.
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."],[[["\u003cp\u003eThis function finds the starting position of the last occurrence of a target list within another list.\u003c/p\u003e\n"],["\u003cp\u003eIf the target list is not found within the main list, it returns -1.\u003c/p\u003e\n"],["\u003cp\u003eIt is used specifically for searching for a sublist within a larger list.\u003c/p\u003e\n"],["\u003cp\u003eThe function is called on a list object and takes the target list as an argument.\u003c/p\u003e\n"],["\u003cp\u003eThe return value is always an integer representing the index of the last occurrence or -1 if not found.\u003c/p\u003e\n"]]],["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"],null,["# ee.List.lastIndexOfSubList\n\nReturns the starting position of the last occurrence of target within list, or -1 if there is no such occurrence.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-----------------------------------|---------|\n| List.lastIndexOfSubList`(target)` | Integer |\n\n| Argument | Type | Details |\n|--------------|------|---------|\n| this: `list` | List | |\n| `target` | List | |"]]