title: Return string without trailing slash
body: <p>I have two variables:  </p>
  
  <pre><code>site1 = "www.somesite.com";  
  site2 = "www.somesite.com/";  
  </code></pre>
  
  <p>I want to do something like this</p>
  
  <pre><code>function someFunction(site)
  {
      // If the var has a trailing slash (like site2), 
      // remove it and return the site without the trailing slash
      return no_trailing_slash_url;
  }
  </code></pre>
  
  <p>How do I do this?</p>