src/Shared/String/ConversionTrait.php
public static function removeSuffix(
        /*# string */ $string,
        /*# string */ $suffix
    )/*# string */ {
        if (static::hasSuffix($string, $suffix)) {
            return substr($string, 0, - strlen($suffix));
        }
        return $string;
    }
public static function removeSuffix(
        /*# string */ $string,
        /*# string */ $suffix
    )/*# string */ {
        if (static::hasSuffix($string, $suffix)) {
            return substr($string, 0, - strlen($suffix));
        }
        return $string;
    }
Remove a suffix from a string

@param  string $string
@param  string $suffix
@return string
@access public
@static