-/* Finds the last NEEDLE of length NEEDLE_LEN in a HAYSTACK of length
- HAYSTACK_LEN. Returns a pointer to the needle found. */
-char *
-buf_find_reverse (const char *haystack, size_t haystack_len,
- const char *needle, size_t needle_len)
-{
- int i;
- for (i = haystack_len - needle_len; i >= 0; i--)
- if (!memcmp (needle, &haystack[i], needle_len))
- return (char *) &haystack[i];
- return 0;
-}
-