title: Remove trailing substring from String in Java
body: <p>I am looking to remove parts of a string if it ends in a certain string.</p>
  
  <p>An example would be to take this string: <code>"am.sunrise.ios@2x.png"</code></p>
  
  <p>And remove the <code>@2x.png</code> so it looks like: <code>"am.sunrise.ios"</code></p>
  
  <p>How would I go about checking to see if the end of a string contains <code>"@2x.png"</code> and remove it?</p>