public function position(string $needle, int $offset = 0): int
    {
        $position = \mb_strpos($this->value, $needle, $offset, (string) $this->encoding());

        if ($position === false) {
            throw new SubstringException(\sprintf(
                'Substring "%s" not found',
                $needle
            ));
        }

        return (int) $position;
    }