I am trying to find a similar function to strstr that searches a substring starting from the end towards the beginning of the string.
strstr
I don't believe there is in the c string lib, but it would be trivial to write your own, On one condition, you know the length of the string or it is properly terminated.