neufpas_66702
May 25, 2011Nimbostratus
strip trailing slashes
Given a string with an arbitrary number of slashes (HTTP::path for example), how do I remove the final slash if it has one? I'm testing with ends_with "/" but after that... I've got nothing. I'm sure it's possible, but I honestly can't figure it out. This should be easy but it doesn't appear to be given the tools provided.
Any help?