I think you can still do it using library functions.
1.Use strrev function to reverse the string.
2.Use strstr function to do whatever you want to do.
3.You can find start index (from reverse ) of the search string by subtracting start index of the search string from the length of original string.