title: How do I locate the last occurrence of string in a string?
body: <p>Is there a function which would search for the last occurrence of a certain substring and return the index of it?</p>
  
  <p>For example, if I want to search for the last occurrence of the char '<code>\</code>' in a file path '<code>C:\Program Files\Microsoft</code>'.</p>