platform-bible-utils
    Preparing search index...

    Function lastIndexOf

    • This function mirrors the lastIndexOf function from the JavaScript Standard String object. It operates on grapheme clusters instead of UTF-16 code units.

      Returns the index of the last occurrence of the specified substring, or -1 if it is not found.

      Parameters

      • string: string

        String to search through

      • searchString: string

        Substring to search for

      • Optionalposition: number

        The index at or before which the occurrence must begin. If omitted, the whole string is searched. Negative values clamp to 0

      Returns number

      Index of the last occurrence of searchString, or -1 if not found