How do i strip special characters from the end of a string?
<p>I need to strip unknown characters from the end of a string returned from an SQL database. I also need to log when a special character occurs in the string.</p>

<p>What's the best way to do this?</p>
