• Returns whether the characters at the end of this string match the searchString, starting at position.

    Parameters

    • str: string
    • searchString: string

      The element to search for.

    • Optional endPosition: number

    Returns boolean