public static function endsWith($str, $suffix)
    {
        return ((null === $str) && (null === $suffix))
            ? true
            : self::substring(
                $str,
                self::length($str) - self::length($suffix)
            ) === $suffix;
    }