title: Get last character of a string from a variable
body: <p>I am having issues with a problem accomplished very easily in most languages but I can't seem to figure it out in batch.  I want to extract the last character of a string. In pseudo code..</p>
  
  <pre><code>if var1.substring(var1.length, -1) = "0"
    do something
  </code></pre>
  
  <p>In english...if the last character in the string is 0 then...</p>