Seek to an absolute position

@param   integer               $index
@throws  OutOfBoundsException  When the seek position is invalid
@return  void
425500
public function seek($index)
	{
		$this->rewind();

		while ($this->_pos < $index && $this->valid())
		{
			$this->next();
		}

		if (!$this->valid())
		{
			throw new \OutOfBoundsException(\Lang::txt('Invalid seek position'));
		}
	}
1109376
public function seek($iOffset)
    {
        $this->rewind();
        $iPosition = 0;

        while ($iPosition < $iOffset and true === $this->valid()) {
            $this->next();
            $iPosition++;
        }

        if (false === $this->valid()) {
            throw new \OutOfBoundsException('Invalid seek position: ' . $iOffset);
        }

        return $this->current();
    }
1210462
public function get($index)
    {
        $focus = Aim::focus($index);

        if (!$focus->exists($this)) {
            throw new \OutOfBoundsException($index);
        }

        return $focus->get($this);
    }
910059
public function deleteCharAt($index)
	{
		$index = (int) $index;
		if ($index < 0 || $index >= $this->length()) {
			throw new OutOfBoundsException();
		}

		$this->string = mb_substr(
				$this->string,
				0,
				$index,
				$this->encoding
			) .
			mb_substr(
				$this->string,
				$index + 1,
				$this->length(),
				$this->encoding
			);
		return $this;
	}
173763
public function offsetUnset($index)
    {
        if ($this->isReadOnly() === true) {
            throw Exception\Collection::readOnly(get_class($this));
        }

        parent::offsetUnset($index);
    }
51096
public function move($index = false)
    {
        $source = $this->tmpName($index);
        $dest = $this->getAbsolutePath($index);
        $parent = substr($dest, 0, strrpos($dest, '/'));
        if (!is_dir($parent)) {
            mkdir($parent, 0777, true);
        }
        return move_uploaded_file($source, $dest);
    }
217989
public function fetchRow($index)
    {
        $values = @pg_fetch_assoc($this->handler, $index);

        if ($values === false) {
            throw new \OutOfBoundsException(sprintf("Cannot jump to non existing row %d.", $index));
        }

        return $values;
    }
674703
public function offsetSet ($index, $value)
	{
		if (!is_numeric($index)) {
			throw new \OutOfBoundsException('Out of bounds: you are trying to set a non-numeric index.');
		}

		if ($index > $this->count() || $index < 0) {
			throw new \OutOfBoundsException("Invalid index {$index}");
		}

		$this->storage[$index] = $value;

		return null;
	}
766499
public void
jump(int index) {
	if (index >= array.length) {
		throw new IllegalArgumentException("cannot jump past " +
						   "end of input");
	}
	pos = index;
	end = array.length;
}
749146
public function seek($position)
    {
        if ($position < 0) {
            throw new \OutOfBoundsException("Unable to seek to negative offset $position");
        }

        if ($this->_position !== $position) {
            if(($count = $this->_result->num_rows) && ($position > ($count-1)))
                throw new \OutOfBoundsException("Unable to seek to offset $position");

            if ($count) {
                $this->_result->data_seek($this->_position = $position);
                $this->_currentRow = $this->_fetch();
            }

            $this->_position = $position;
        }
    }
260639
public function removeFromIndex($index)
    {
        $index = intval($index);
        if ($this->length() > $index) {
            for ($i = $index + 1; $i < $this->length(); ++$i) {
                if ($this->offsetExists($i)) {
                    $this->offsetUnset($i);
                }
            }
        }
    }
381240
public function seek($index, $token = false)
    {
        $this->_current = (int) $index;
        return $this->current($token);
    }
1129986
public function seek($pos)
     {
        if ($this->_iterationMax === null) {
          $this->_iterationMax = $this->countMessages();
        }

        if ($pos > $this->_iterationMax) {
            throw new OutOfBoundsException('this position does not exist');
        }
        $this->_iterationPos = $pos;
     }
496251
public function set_seek_position($position)
    {
        $this->seek_position = isset($position) ? (integer)$position : null;

        return $this;
    }
426729
private function findPosition($index){
        if ($index < $this->total){
            $this->letter[] = $this->alphabet[$index];
        }
        else {
            $mod = $index % $this->total;
            $div = (int) $index / $this->total;
            $this->letter[] = $this->alphabet[$mod];
            $this->findPosition($div-1);
        }
    }
1158319
public function peek($position)
	{
		if($position instanceof \Countable || is_array($position))
		{
			$position = count($position);
		}

		$pos = $this->index + (int)$position;

		if($this->sequence->offsetExists($pos))
		{
			return $this->sequence->offsetGet($pos);
		}

		throw new \OutOfBoundsException('No token at position ' . $pos . ' found');
	}
83467
public function offsetSet($offset, $value): void
    {
        if (null === $offset) {
            $this->resolver->value(function ($value): void {
                $this->items->add($value);
            }, $value);

            return;
        }

        throw new \OutOfBoundsException();
    }