src/Sulu/Bundle/RouteBundle/Routing/RouteProvider.php
private function stripFormatExtension($path, $format)
    {
        $extension = '.' . $format;
        if (substr($path, -strlen($extension)) === $extension) {
            $path = substr($path, 0, strlen($path) - strlen($extension));
        }

        return $path;
    }
private function stripFormatExtension($path, $format)
    {
        $extension = '.' . $format;
        if (substr($path, -strlen($extension)) === $extension) {
            $path = substr($path, 0, strlen($path) - strlen($extension));
        }

        return $path;
    }
private function stripFormatExtension ( $ path , $ format ) { $ extension = '.' . $ format ; if ( substr ( $ path , - strlen ( $ extension ) ) === $ extension ) { $ path = substr ( $ path , 0 , strlen ( $ path ) - strlen ( $ extension ) ) ; } return $ path ; }
Return the given path without the format extension.

@param string $path
@param string $format

@return string
Return the given path without the format extension .