Forum Discussion

neufpas_66702's avatar
neufpas_66702
Icon for Nimbostratus rankNimbostratus
May 25, 2011

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 ...