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
504366
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();
    }
419154
public function offsetGet($offset)
    {
        $path = explode($this->delimiter, $offset);
        $deep = &$this->container;
        $count = count($path);
        for ($i = 0; $i < $count; $i++) {
            $point = $path[$i];
            if (array_key_exists($point, $deep)) {
                $deep = &$deep[$point];
            } else {
                return null;
            }
        }
        return $deep;
    }
1056830
protected function __string($offset)
    {
        $offset += $this->bb->getInt($offset);
        $len = $this->bb->getInt($offset);
        $startPos = $offset + Constants::SIZEOF_INT;
        return substr($this->bb->_buffer, $startPos, $len);
    }
1187987
public function offsetGet($offset)
    {
        if (is_int($offset)) {
            return $this->offsetGet_int($offset);
        }

        return $this->offsetGet_string($offset);
    }
585146
public function offsetGet($offset)
    {
        return isset($this->target[$offset]) ? $this->target[$offset] : null;
    }
861242
public function offsetGet($offset)
    {
        if (isset($this->values[$offset])) {
            return $this->values[$offset];
        }

        return null;
    }
589094
public function offsetGet($offset)
    {
        if ($offset instanceof UniqueId) {
            $offset = $offset->id();
        }

        return $this->elements->offsetGet($offset);
    }
986086
public function offsetGet($offset)
    {
        if (is_array($this->{$offset})) {
            return implode(',', $this->{$offset});
        }

        return $this->{$offset};
    }
1217416
public function offsetExists($offset)
    {
        if (is_int($offset)) {
            return $this->offsetExists_int($offset);
        }

        return $this->offsetExists_string($offset);
    }
1330809
public function lastIndexOf($string, $offset = null) {
		if (null === $offset) {
			$offset = $this->length();
		} else {
			$offset = $this->prepareOffset($offset);
		}

		if ($string === '') {
			return $offset;
		}

		/* Converts $offset to a negative offset as strrpos has a different
		 * behavior for positive offsets. */
		return mb_strrpos($this, (string) $string, $offset - $this->length(), $this->encoding);
	}
1004168
protected function computeOffset($offset)
    {
        $length = \mb_strlen($this->_string);

        if (0 > $offset) {
            $offset = -$offset % $length;

            if (0 !== $offset) {
                $offset = $length - $offset;
            }
        } elseif ($offset >= $length) {
            $offset %= $length;
        }

        return $offset;
    }
804959
public function next($offset = 1)
    {
        $nextDateTime = clone $this->startDateTime;
        $nextDateTime->modify('+'.abs($offset).' months');
        return new Month($nextDateTime);
    }
1188828
public function nextSequence($sequence)
    {
        $start = $this->_current;
        $result = '';
        $len = strlen($sequence);
        $lastToken = substr($sequence, -1);

        while (($content = $this->next($lastToken)) !== null) {
            $result .= $content;
            if (strlen($result) >= $len && substr_compare($result, $sequence, -$len, $len) === 0) {
                return $result;
            }
        }
        $this->_current = $start;
    }
1361879
protected function _getRealOffset($offset)
    {
        /* Optimize: check for base $offset in array first. */
        if (parent::offsetExists($offset)) {
            return $offset;
        }

        foreach (array_keys($this->getArrayCopy()) as $key) {
            if (strcasecmp($key, $offset) === 0) {
                return $key;
            }
        }

        return null;
    }
585945
public function offsetGet($offset)
    {
        $index = $this->findLine($offset);

        if ($index > 0) {
            $parsedKey   = null;
            $parsedValue = null;

            $parseOk = $this->parseEnvLine($this->lines[$index], $parsedKey, $parsedValue);

            return $parseOk ? $parsedValue : null;
        }

        return null;
    }
363728
public function offsetGet($offset) {

        if (isset($this->_writeProperties[$offset])) {
            
            return $this->_writeProperties[$offset];
        }
        elseif (isset($this->_readProperties[$offset]) ) {
            
            return $this->_readProperties[$offset];
        }
        else {
            // Trace debug
            $lastFile = debug_backtrace()[0]['file'];
            $lastLine = debug_backtrace()[0]['line'];
            trigger_error("Undefined index: " . get_called_class() . "->{$offset} called by {$lastFile}:{$lastLine}", E_USER_NOTICE);

            return null;
        }
    }
1100285
private function _parseAttrString(int &$offset): string
    {
        $idx = $offset;
        $val = "";
        $wsidx = null;
        while ($idx < $this->_len) {
            $c = $this->_dn[$idx];
            // pair (escape sequence)
            if ("\\" == $c) {
                ++$idx;
                $val .= $this->_parsePairAfterSlash($idx);
                $wsidx = null;
                continue;
            } else if ('"' == $c) {
                throw new \UnexpectedValueException("Unexpected quotation.");
            } else if (false !== strpos(self::SPECIAL_CHARS, $c)) {
                break;
            }
            // keep track of the first consecutive whitespace
            if (' ' == $c) {
                if (null === $wsidx) {
                    $wsidx = $idx;
                }
            } else {
                $wsidx = null;
            }
            // stringchar
            $val .= $c;
            ++$idx;
        }
        // if there was non-escaped whitespace in the end of the value
        if (null !== $wsidx) {
            $val = substr($val, 0, -($idx - $wsidx));
        }
        $offset = $idx;
        return $val;
    }