src/MediaMover.php
protected function removeExtensionFromFilename($filename, $extension)
    {
        $extension = '.'.$extension;
        $extension_length = mb_strlen($filename) - mb_strlen($extension);
        if (mb_strrpos($filename, $extension) === $extension_length) {
            $filename = mb_substr($filename, 0, $extension_length);
        }

        return $filename;
    }
protected function removeExtensionFromFilename($filename, $extension)
    {
        $extension = '.'.$extension;
        $extension_length = mb_strlen($filename) - mb_strlen($extension);
        if (mb_strrpos($filename, $extension) === $extension_length) {
            $filename = mb_substr($filename, 0, $extension_length);
        }

        return $filename;
    }
protected function removeExtensionFromFilename ( $ filename , $ extension ) { $ extension = '.' . $ extension ; $ extension_length = mb_strlen ( $ filename ) - mb_strlen ( $ extension ) ; if ( mb_strrpos ( $ filename , $ extension ) === $ extension_length ) { $ filename = mb_substr ( $ filename , 0 , $ extension_length ) ; } return $ filename ; }
Remove the media's extension from a filename.
@param  string $filename
@param  string $extension
@return string
Remove the media s extension from a filename .