File::stripTrailingSeparators()

File::stripTrailingSeparators() -- strips trailing separators from a path

Synopsis

require_once 'File.php';

string File:stripTrailingSeparators (string $path [, string $separator = DIRECTORY_SEPARATOR])

Description

This method removes the trailing directory separator (like "/" on *nix) from a path name.

Parameter

Return value

This methods returns the given path name without a trailing directory separator.

Note

This function can be called statically.

Example