Returns the character at the given <i>$i</i> position in the string.
The position must be a valid index position in the string (i.e., 0 <= position < size()).

@param int $i
@return string|null
@throws MWrongTypeException
189199
public function at($i)
    {
        $result = substr($this->text, $i, 1);

        if ($result === false) {
            return null;
        }

        return $result;
    }
562187
public function getAt($i){
        return isset($this->instanceByIndex[$i])
            ? $this->instanceByIndex[$i]
            : null;
    }
853209
public function &get_column($i)
    {
        if (!isset($this->_columns[$i])) {
            $this->_columns[$i] = array(
                "x"          => 0,
                "min-width"  => 0,
                "max-width"  => 0,
                "used-width" => null,
                "absolute"   => 0,
                "percent"    => 0,
                "auto"       => true,
            );
        }

        return $this->_columns[$i];
    }
1263659
private String getLabel(int i)
	{
		for (String label : labelMap.keySet())
		{
			if (labelMap.get(label) == i) return label;
		}
		return null;
	}
692018
public final function getData(int $i = null)
    {
        if ($i !== null) {
            if ($i < 0) {
                $i = count($this->data) + $i; // reverse
            }
            return $this->data[$i] ?? null;
        }
        return $this->data;
    }
407675
public function getName($index = null)
    {
        $type = $this->getType($index);
        return is_int($type) ? token_name($type) : null;
    }
1304453
public function getSearchIndex($index)
    {
        return isset($this->search[$index]) ? $this->search[$index] : null;
    }
292017
public Node getNode(final int i) {
        if (i < 0 || i >= nodeList.size()) {
            return null;
        }
        return nodeList.get(i);
    }
255138
public KeyDeclaration getKey(int i) throws ArrayIndexOutOfBoundsException
  {

    if (null == m_keyDeclarations)
      throw new ArrayIndexOutOfBoundsException();

    return (KeyDeclaration) m_keyDeclarations.elementAt(i);
  }
595930
function get_child( $i ){
		return isset($this->children[$i]) ? $this->children[$i] : null;
	}
33196
public function getCaptured($i) {
      if ($this->success) {
         if ($i >= 0) {
            $i++; // Captured groups starts from index 1. Index 0 is  the whole match! 
            if (array_key_exists($i, $this->matches)) {
               return new Group($this->matches[$i]);
            } else {
               throw new RuntimeException("The index " . $i . " does not identify any captured subpattern");
            }
         } else {
            throw new RuntimeException("Negative indexes are not allowed");
         }
      } else {
         throw new RuntimeException("The matching was not succesfull");
      }
   }
505145
@Nonnull
    static String headerLetter(final int i) {
        final int flags = DATA_MODEL.getDataFlags(i);

        // TODO: The "magic" of how to interpret flags must be in DataModel, not here.
        if (((flags >> 7) & 3) == 1) {
            return Character.toString(ENCODE_CHARS[(flags >> 11) & 31]);
        }
        return "";
    }
151417
public function replace(int $i, $value)
    {
        if ($this->isValidType($value) === false) {
            throw new MWrongTypeException("\$value", $this->getType(), $value);
        }

        $this->list[$i] = $value;
    }
1011077
public function addIcon($i)
    {
        /** @type Icon $icon */
        $icon = $this->add('Icon', null, 'Icon');

        return $icon->set($i)->addClass('atk-size-mega');
    }
369925
public function item(int $index): ?string
    {
        $classes = $this->getClasses();

        return $classes[$index] ?? null;
    }
65884
public function get_step($i) {
        if ($i < 0 || $i >= count($this->steps)) {
            throw new coding_exception('Index out of bounds in question_attempt::get_step.');
        }
        return $this->steps[$i];
    }
1236514
private function hexToInt($s, $i)
    {
        $j = (int) $i * 2;
        $k = 0;
        $s1 = (string) $s;

        // Get the character at position $j.
        $c = substr($s1, $j, 1);

        // Get the character at position $j + 1.
        $c1 = substr($s1, $j + 1, 1);

        switch ($c) {
            case 'A':
                $k += 160;
                break;
            case 'B':
                $k += 176;
                break;
            case 'C':
                $k += 192;
                break;
            case 'D':
                $k += 208;
                break;
            case 'E':
                $k += 224;
                break;
            case 'F':
                $k += 240;
                break;
            case ' ':
                $k += 0;
                break;
            default:
                $k = $k + (16 * (int) $c);
                break;
        }

        switch ($c1) {
            case 'A':
                $k += 10;
                break;
            case 'B':
                $k += 11;
                break;
            case 'C':
                $k += 12;
                break;
            case 'D':
                $k += 13;
                break;
            case 'E':
                $k += 14;
                break;
            case 'F':
                $k += 15;
                break;
            case ' ':
                $k += 0;
                break;
            default:
                $k += (int) $c1;
                break;
        }

        return $k;
    }