Lose the last 3 chars from string variable

Posted by Phil on Stack Overflow See other posts from Stack Overflow or by Phil
Published on 2010-03-25T09:54:18Z Indexed on 2010/03/25 12:23 UTC
Read the original article Hit count: 208

Filed under:
|
|
|

if the last 4 chars in my string(result) are " AND" or the last three chars are " OR" I would like to remove these from the string. So far I have am trying result.trimend and a few other methods but am unsure how to get it working.

Thanks

© Stack Overflow or respective owner

Related posts about trim

Related posts about string