public static function removePostFixWith($name, $fix = '/')
    {
        $position = strripos($name, $fix);

        if ($position !== false) {
            return substr($name, 0, $position);
        }

        return $name;
    }
public static function removePostFixWith($name, $fix = '/')
    {
        $position = strripos($name, $fix);

        if ($position !== false) {
            return substr($name, 0, $position);
        }

        return $name;
    }
public static function removePostFixWith ( $ name , $ fix = '/' ) { $ position = strripos ( $ name , $ fix ) ; if ( $ position !== false ) { return substr ( $ name , 0 , $ position ) ; } return $ name ; }
Removes a string from the end of another given string if it already ends with it.

@param  string  $name
@param  string  $fix

@return string
Removes a string from the end of another given string if it already ends with it .