public static function codePointBefore($chars, int $index, int $start = null): int
    {
        if ($start !== null && ($start < 0 || $index <= $start)) {
            throw new InvalidArgumentException('Start cannot be negative and index must be greater than start!');
        }

        return static::codePointAt($chars, $index - 1);
    }