title: JavaScript indexOf from end of search string
body: <p>Javascript's <code>String.indexOf</code> returns the index of the a search term within a string.</p>
  
  <p>It returns the index of where the string is first found, from the beginning of the search string. example:</p>
  
  <pre><code>'abcdefghijklmnopqrstuvwxyz'.indexOf('def') = 3;
  </code></pre>
  
  <p>But I need to get it from the end of the search, for example:</p>
  
  <pre><code>'abcdefghijklmnopqrstuvwxyz'.indexOf('def') = 6; //essentially index + searchString.length
  </code></pre>
  
  <p>so that I can then <code>String.substr</code> from the returned value to get the string after that point.</p>