Link to home
Start Free TrialLog in
Avatar of MaybeItsJeremy
MaybeItsJeremy

asked on

Detect if character occurs at end of string, is so, remove it.

I need to detect if a foreword slash ( / ) occurs at the end of a string, and if it does, it needs to be removed from the string.
ASKER CERTIFIED SOLUTION
Avatar of Roonaan
Roonaan
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MaybeItsJeremy
MaybeItsJeremy

ASKER

Thank you, Roonaan. That's a very effective and very fast approach, I was expecting a preg_match result or something similar, this is clearly much, much better.