Removes trailing slash if it exists.
The primary use of this is for paths and thus should be used for paths. It is not restricted to paths and offers no specific path support.
<?php untrailingslashit( $string ); ?>
Since: 2.2.0
untrailingslashit() is located in wp-includes/formatting.php
.