protected function stripSuffix(string $path, string $suffix1, string $suffix2)
    {
        if (substr($path, -strlen($suffix2)) === $suffix2)
            $path = substr($path, 0, -strlen($suffix2));
        if (substr($path, -strlen($suffix1)) === $suffix1)
            $path = substr($path, 0, -strlen($suffix1));
        return $path;
    }
protected function stripSuffix(string $path, string $suffix1, string $suffix2)
    {
        if (substr($path, -strlen($suffix2)) === $suffix2)
            $path = substr($path, 0, -strlen($suffix2));
        if (substr($path, -strlen($suffix1)) === $suffix1)
            $path = substr($path, 0, -strlen($suffix1));
        return $path;
    }
protected function stripSuffix ( string $ path , string $ suffix1 , string $ suffix2 ) { if ( substr ( $ path , - strlen ( $ suffix2 ) ) === $ suffix2 ) $ path = substr ( $ path , 0 , - strlen ( $ suffix2 ) ) ; if ( substr ( $ path , - strlen ( $ suffix1 ) ) === $ suffix1 ) $ path = substr ( $ path , 0 , - strlen ( $ suffix1 ) ) ; return $ path ; }
Remove the suffix from a file name, such as .min.css or .min.js
@param string $path The file to strip
@param string $suffix1 One suffix to strip. This one is stripped after
the second, so it should come second-last.
This probably should be .min
@param string $suffix2 Another suffix to strip. This one is stripped
from the right first, so it should come last in
the file name. This probably should be .js or .css
@return string The stripped file name.
Remove the suffix from a file name such as . min . css or . min . js