Definition:
function untrailingslashit($string) {}
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.
Parameters
- string $string: What to remove the trailing slash from.
Return values
returns:String without the trailing slash.
Source code
function untrailingslashit($string) { return rtrim($string, '/'); }
3147
No comments yet... Be the first to leave a reply!