Searches the string haystack for the last occurrence of the string needle, limiting the length of the search to haystack_len.