public function takeAllAlphaNumUntil(string $ends): string
    {
        $ends = self::split($ends);

        $ends[] = "alphanumeric";

        $taken = "";

        while (ctype_alnum($this->peek())) {
            $char = $this->take();

            $taken .= $char;
        }

        $this->latestExpectations = $ends;

        if (!in_array($this->peek(), $ends)) {
            throw new UnexpectedChar($this, $ends);
        }

        return $taken;
    }