inserts a value at index $index

@param int    $index
@param string $string
490818
public function insert(int $index, string $string) {
        if (\strlen($string) > 1) {
            $string = $string[0];
        }
        $this->arrayList->addToIndex($index, $string);
    }
801842
public function insert( $position, $string )
	{
		if( $position<= $this->count() && $position >=0 )
		{
			if( $position < $this->pointer )
				$this->pointer = $this->pointer + strlen( $string );
			$left	= substr( $this->toString(), 0, $position );
			$right	= substr( $this->toString(), $position );
			$this->buffer = $left.$string.$right;
		}
		return $this->toString();
	}
570815
public void insertItem (T item, int index, String label)
    {
        insertItem(label == null ? toLabel(item) : label, index);
        _items.add(index, item);
    }
645661
@NonNull
    @Override
    public MutableArray insertString(int index, String value) {
        return insertValue(index, value);
    }
952649
public function writeToResource($index, $string, $length = null)
    {
        return isset($this->_pipes[$index]) ? fwrite($this->_pipes[$index], $string, $length) : false;
    }
305523
public StrBuilder insert(final int index, final char value) {
        validateIndex(index);
        ensureCapacity(size + 1);
        System.arraycopy(buffer, index, buffer, index + 1, size - index);
        buffer[index] = value;
        size++;
        return this;
    }
1261646
def insert(self, index: int, obj: Any) -> None:
        
        if obj is not None:
            super().insert(index, obj)
798283
public void setValue(int index, int value) throws IOException {
        if (index >= structure.valueSizes.size()) {
            throw new IOException("Index " + index + " is out of range.");
        }
        Bytes.putInt(this.value, structure.valueByteOffsets.get(index), value);
    }
1095969
public static function set(string $index, $value)
    {
        Base::checkOpen();
        Base::getSessionObject()->set($index, $value);
    }
401834
public function with($index, $value)
    {
        $res = clone $this;

        $res->fragments = $this->insertInList($res->fragments, $index, $value);

        return $this;
    }
542458
public void setValue (int index, String value)
    {
    if (index >= 0 && index < length) {
        data[index*5+4] = value;
    } else {
        badIndex(index);
    }
    }
769349
public function offsetSet($index, $value) {
		if( is_null($index) ){
			$this->results[] = $value;
			return;
		}
		$this->results[$index] = $value;
	}
436830
public static function at($string, $index)
    {
        if (self::length($string) >= ($index + 1)) {
            return $string[$index];
        }

        exception(StringOutIndexException::class);
    }
760324
public function insert($index, self $str){
		
		if(!$this->offsetExists($index)){
			throw new \OutOfRangeException('$index is invalid');
		}
		
		return new static(
				$this->substring(0, $index) .
				$str->_Value .
				$this->substring($index),
			$this->_Encoding);
		
	}
366545
public function set(int $index, $value): bool {
        if ($index < 0 || $index > $this->size()) {
            throw new IndexOutOfBoundsException();
        }
        $this->array[$index] = $value;
        return true;
    }
307509
public function set($index, $value)
    {
        if($index >= $this->count())
            throw new OutOfRangeException('Index out of range');

        $this->_collection[$index] = $value;
    }
232908
public function setField(Field $field, $index = 0)
    {
        $this->field = $field;
        $this->valueIndex = $index;
    }