public static function removeTrailingSlash( $path, $slash = DIRECTORY_SEPARATOR ) {
		$path = static::normalizePath( $path, $slash );
		$path = preg_replace( '~' . preg_quote( $slash, '~' ) . '+$~', '', $path );
		return $path;
	}
public static function removeTrailingSlash( $path, $slash = DIRECTORY_SEPARATOR ) {
		$path = static::normalizePath( $path, $slash );
		$path = preg_replace( '~' . preg_quote( $slash, '~' ) . '+$~', '', $path );
		return $path;
	}
public static function removeTrailingSlash ( $ path , $ slash = DIRECTORY_SEPARATOR ) { $ path = static :: normalizePath ( $ path , $ slash ) ; $ path = preg_replace ( '~' . preg_quote ( $ slash , '~' ) . '+$~' , '' , $ path ) ; return $ path ; }
Ensure path does not have a trailing slash.

@param  string $path
@param  string $slash
@return string
Ensure path does not have a trailing slash .