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
Long story short:
Nope - there is no function in the C-library that does what you need..
But as others have pointed out: It's not rocket-science to write such a function...