title: Reverse lastIndexOf
body: <p>I have a little question which I don't find any documentation about it (or it doesn't exist, or I'm searching in a wrong way..)
  I have an ID which I want to get the whole string before the last character I choose.</p>
  
  <p>In this case:</p>
  
  <pre><code>str_stringId = "AB_generalForm_DateTime_calendar";
  str_dateId = str_firstId.substring(str_firstId.lastIndexOf("_") +1);
  </code></pre>
  
  <p>In this case, str_dateId returns "calendar", but I want the whole string behind it. 
  Is there a way to reverse this operation or do I need to count the number of letters of the whole string and then subtract with the length of "str_dateId" and after that, substring with the result?</p>
  
  <p>Thank you.</p>