Find a position for a letter
@param $index
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);
        }
    }
1232856
public function seek($index)
    {
        $this->rewind();
        $position = 0;

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

        if (!$this->valid()) {
            throw new CollectionException('Invalid seek position');
        }
    }
347664
public function offsetExists($index)
    {
        $index = (int)$index;

        if ($index >= 0) return ($this->getLength() > $index);

        return ($this->getLength() >= abs($index));
    }
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'));
		}
	}
550361
protected function getPrefixAt($index)
    {
        $prefixes = $this->getPrefixes();
        return isset($prefixes[$index]) ? $prefixes[$index] : null;
    }
90838
public function getByIndex(int $index) : string
        {
                $value = $this->_redis->lindex($this->_key, $index);
                return !empty($value)?$value:'';
        }
524896
public function getIndex($index)
    {
        if (is_string($index) &&
            is_array($this->secondary_indexes) &&
            array_key_exists($index, $this->secondary_indexes)
        ) {
            return $this->secondary_indexes[$index];
        } else {
            throw new ENabuCoreException(ENabuCoreException::ERROR_INVALID_INDEX, array(print_r($index, true)));
        }
    }
527042
public function offsetExists( $index ) {
		if ( $this->deepSelectorOption ) {
			return \UArray::hasDeepSelector( $this->getArrayCopy( ), $index );
		}
		return parent::offsetExists( $index );
	}
978105
protected function correctIndexOffset($index)
    {
        return mb_strlen(mb_substr($this->title, 0, $index, $this->encoding), $this->encoding);
    }
83196
public function getParamClean($index){
        if(isset($this->params[$index])){
            return $this->params[$index];
        }else{
            return NULL;
        }
    }
59736
private function findIn(array $collection, $index, $pattern)
    {
        $total = count($collection);
        while ($index < $total) {
            $found = $this->match($pattern, $collection, $index++);
            if ($found !== false) {
                $token = $collection[$found];

                return $token->getLineNumber();
            }
        }

        return false;
    }
370626
public function getUriSegment($index)
    {
        $segments = explode('/', $this->server->get('REQUEST_URI'));
        if (isset($segments[$index])) {
            return $segments[$index];
        }
        return false;
    }
1117440
public function getTokenAt($index) {
        // Get token from behind
        if ($index < 0) {
            $index = count($this->tokens) + $index;
        }

        return $this->tokens[$index];
    }
813666
public function selectButtonByIndex($index)
	{
		if ( isset($this[$index]) ) {
			/** @var RadioButton $button */
			$button = $this[$index];
			$button->select();

			return $this;
		}

		throw new RadioGroupException(
			'Cannot locate radio button with index: ' . $index,
			RadioGroupException::TYPE_NOT_FOUND
		);
	}
198471
public function atIndex(int $index)
    {
        $i = 0;
        foreach ($this->items as $key => $value) {
            if ($i++ == $index) {
                return $value;
            }
        }

        return null;
    }
262759
public function offsetGet($index)
    {
        foreach ((array)$this as $i => $element) {
            $i = (string)$i;
            if (is_string($element)) {
                continue;
            }
            if ($element->getElement()->getValue() == $index) {
                return $element;
            }
        }
        return parent::offsetGet($index);
    }
549396
public function offsetGet( $index )
    {
        return call_user_func(
            $this->fetchCallback,
            pg_fetch_array( $this->resource, $index, $this->fetchType )
        );
    }