public function following(int $offset): string
    {
        $this->rewind();
        while ($this->valid()) {
            $this->next();
            $nextElement = $this->getCurrentElement();
            if ($nextElement->getOffset() >= $offset) {
                return $nextElement->getOffset();
            }
        }
        return $this->offset();
    }
public function following(int $offset): string
    {
        $this->rewind();
        while ($this->valid()) {
            $this->next();
            $nextElement = $this->getCurrentElement();
            if ($nextElement->getOffset() >= $offset) {
                return $nextElement->getOffset();
            }
        }
        return $this->offset();
    }
public function following ( int $ offset ) : string { $ this -> rewind ( ) ; while ( $ this -> valid ( ) ) { $ this -> next ( ) ; $ nextElement = $ this -> getCurrentElement ( ) ; if ( $ nextElement -> getOffset ( ) >= $ offset ) { return $ nextElement -> getOffset ( ) ; } } return $ this -> offset ( ) ; }
Returns the next elment following the character of the original string
given by its offset

@param integer $offset The offset of the character
@return string The element following this character
Returns the next elment following the character of the original string given by its offset