title: ruby on rails, replace last character if it is a * sign
body: <p>I have a string and I need to check whether the last character of that string is *, and if it is, I need to remove it.</p>
  
  <pre><code>if stringvariable.include? "*"
   newstring = stringvariable.gsub(/[*]/, '')
  end
  </code></pre>
  
  <p>The above does not search if the '*' symbol is the LAST character of the string.</p>
  
  <p>How do i check if the last character is '*'?</p>
  
  <p>Thanks for any suggestion</p>