Forum Discussion
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 ...
hooleylist
May 26, 2011Cirrostratus
It's not described in detail in the string range section of the string man page but it's in the string index portion:
http://www.tcl.tk/man/tcl8.4/TclCmd/string.htmM12
end-integer
The last char of the string minus the specified integer offset (e.g. end-1 would refer to the "c" in "abcd").
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects