Is there a function which would search for the last occurrence of a certain substring and return the index of it?

For example, if I want to search for the last occurrence of the char '`\`' in a file path '`C:\Program Files\Microsoft`'.