Returns the unicode code point at specified index

@param int $index
@return int
@throws InvalidArgumentException
@throws OutOfBoundsException
2252
public function codePointAt(int $index): int
    {
        return mb_ord((string) $this->charAt($index), $this->encoding);
    }
525403
protected function getIndexSqlDefinition(Index $index)
    {
        $def = '';
        $limit = '';
        if ($index->getLimit()) {
            $limit = '(' . $index->getLimit() . ')';
        }

        if ($index->getType() == Index::UNIQUE) {
            $def .= ' UNIQUE';
        }

        if ($index->getType() == Index::FULLTEXT) {
            $def .= ' FULLTEXT';
        }

        $def .= ' KEY';

        if (is_string($index->getName())) {
            $def .= ' `' . $index->getName() . '`';
        }

        $def .= ' (`' . implode('`,`', $index->getColumns()) . '`' . $limit . ')';

        return $def;
    }
513769
protected function getTokenAtIndex(int $index): Token
    {
        if (!$this->hasTokenAtIndex($index)) {
            throw new OutOfRangeException("No token in buffer at given index");
        }
        return $this->tokenList[$index];
    }
868996
public function get($index)
    {
        if (!is_int($index) || $index < 0) {
            throw new \InvalidArgumentException('ItemList::get() expects a positive integer argument.');
        }

        return isset($this->list[$index]) ? $this->list[$index] : null;
    }
461725
public function getOperand($index)
    {
        $operand = $this->getOperandObject($index);
        if ($operand) {
            return $operand->getValue();
        } elseif (is_int($index)) {
            $i = $index - count($this->operands);
            return $i >= 0 && isset($this->additionalOperands[$i]) ? $this->additionalOperands[$i] : null;
        }

        return null;
    }
997458
public function getMapByIndex($index)
    {
        $map = array_slice($this->maps, (int) $index, 1, false);

        return end($map);
    }
253171
protected function readTranslation($index)
    {
        $msgStr = $this->readStringFromTable($index, $this->msgStrTable);
        if (false === $msgStr) {
            $msgStr = array();
        }

        return $msgStr;
    }
566493
public function val($index = 0) {

		if(false === ('-' . intval($index) == '-' . $index)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type integer, "%s" given', __METHOD__, gettype($index)), E_USER_ERROR);
		}

		$val = $this -> strip();

		if(true === isset($val[$index])) {
			return $val[$index];
		}

		return null;
	}
703210
public static function offset(array $tokens, $index)
    {
        if (count($tokens) < 1) {
            return 0;
        }

        if (null === $index) {
            $index = count($tokens) - 1;
        }

        $source = '';

        for ($i = 0; $i < $index; ++$i) {
            $source .= $tokens[$i]->content();
        }

        return strlen($source);
    }
988176
protected function map($index) // -> int
	{
		$r = $index;
		
		if( (null !== $index) && is_integer($index))
		{
			$r    = $index + $this->start;
			$size = $this->data->getSize();
			
			if($r >= $size)
			{
				$r -= $size;
			}
		}
		
		return $r;
	}
434616
public function getParameter($index)
    {
        if (!$this->hasParameter($index)) {
            throw new \InvalidArgumentException(sprintf('Cannot retrieve parameter "%s"', $index));
        }

        return $this->parameters[$index];
    }
249590
public static function ord(string $char): int
    {
        $h = \ord($char[0]);
        
        if ($h <= 0x7F) {
            return $h;
        }
        
        if ($h < 0xC2) {
            throw new \InvalidArgumentException('Could not get unicode codepoint for character: "' . $char . '"');
        }
        
        if ($h <= 0xDF) {
            return ($h & 0x1F) << 6 | (\ord($char[1]) & 0x3F);
        }
        
        if ($h <= 0xEF) {
            return (($h & 0x0F) << 12 | (\ord($char[1]) & 0x3F) << 6 | (\ord($char[2]) & 0x3F));
        }
        
        if ($h <= 0xF4) {
            return (($h & 0x0F) << 18 | (\ord($char[1]) & 0x3F) << 12 | (\ord($char[2]) & 0x3F) << 6 | (\ord($char[3]) & 0x3F));
        }
        
        throw new \InvalidArgumentException('Could not get unicode codepoint for character: "' . $char . '"');
    }
673529
public final String getString(int index)
    {
        Utf8 utf8 = (Utf8) getConstantInfo(index);
        return utf8.getString();
    }
886282
public function getCharAt(int $index): string
    {
        if (!isset($this->charsSet[$index])) {
            throw DictionaryException::indexOutOfBounds();
        }

        return $this->charsSet[$index];
    }
327836
private function charCodeAt($str, $index)
    {
        $char = mb_substr($str, $index, 1, 'UTF-8');
        if (mb_check_encoding($char, 'UTF-8')) {
            $ret = mb_convert_encoding($char, 'UTF-32BE', 'UTF-8');
            $result = hexdec(bin2hex($ret));

            return $result;
        }

        return;
    }
302792
protected function charCodeAt($index)
    {
        $body = $this->source->getBody();
        $char = mb_substr($body, $index, 1, 'UTF-8');

        if (mb_check_encoding($char, 'UTF-8')) {
            return hexdec(bin2hex(mb_convert_encoding($char, 'UTF-32BE', 'UTF-8')));
        } else {
            return NULL;
        }
    }
374329
public function getAddIndexDDL(Index $index)
    {
        // don't create index form primary key
        if ($this->getPrimaryKeyName($index->getTable()) == $this->quoteIdentifier($index->getName())) {
            return "";
        }

        $pattern = "
CREATE %sINDEX %s ON %s (%s)%s;
";

        return sprintf($pattern,
            $index->getIsUnique() ? 'UNIQUE ' : '',
            $this->quoteIdentifier($index->getName()),
            $this->quoteIdentifier($index->getTable()->getName()),
            $this->getColumnListDDL($index->getColumns()),
            $this->generateBlockStorage($index)
        );
    }